If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
No announcement yet.
how to make ID (auto increment) appear before save / commit
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.