Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NEW RECORDS

Status
Not open for further replies.

maxxx

Programmer
Nov 15, 2000
12
RU
Developer2000

I insert new record in detail block
The key(id) of this record is autonumber field
I press commit but this key field is still null
(It will become valid value if i execute_query but i don't
want to do it)
After that i go to another block, i must use
those key field (id) , but i don't know it.
Can you solve this problem?
 
I have a similar problem, however, I want a button to Add a record and at the same time generate an ID number. I dont like the autonumber field, so Id planned a select max(idnumber)+ 1 from target_table. I want to press a ADD record button, replace the blank contents of the idnumber with the new generated ID number and let the user edit the other fields and save their record.

 
If you mean that your autonumber value is server-derived, you may do it by selecting it in post insert trigger (by rowid). Another way is to make an assignment in the pre-insert trigger.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top