how to make ID (auto increment) appear before save / commit?
Announcement
Collapse
No announcement yet.
how to make ID (auto increment) appear before save / commit
Collapse
X
-
If you are using an auto increment field you simply cannot. If you use a simple integer you can do a select max(myid) from mytable to get the highest available key and add 1 to it. You can do this in the onload event.
I strongly recommend *not* using this technique if more than one user can access your application. Suppose two people want to add a record. As long as the new number is not inserted both will get the same key. ONe can save, the other will get a duplicate key error.Albert Drent
aducom software netherlands
scriptcase partner, reseller, support and (turn-key) development
www.scriptcase.eu / www.scriptcase.nl
Comment
Comment