| Author |
MSAccess last insert ID ?
|
andrew beales
Greenhorn
Joined: Nov 04, 2002
Posts: 15
|
|
Hello,I want to use something similar to the last insert ID function in mysql.I want to create a new entry in a table and just add an ID of autonumber increment type.I want to be able to view this and manipulate this value.Is ther such a method to peek at the last insert ID of a table? Please help.
|
 |
Stefan Wagner
Ranch Hand
Joined: Jun 02, 2003
Posts: 1923
|
|
|
|
http://home.arcor.de/hirnstrom/bewerbung
|
 |
Eddie Vanda
Ranch Hand
Joined: Mar 18, 2003
Posts: 281
|
|
|
You may need to synchronize the two JDBC calls in case another client comes in and adds a record in between your two calls.
|
The nice thing about Standards is that there are so many to choose from!
|
 |
Blake Minghelli
Ranch Hand
Joined: Sep 13, 2002
Posts: 331
|
|
|
If you are using Access 2000 or greater, then I heard (never tried it myself) you can do this: (just like SQLServer) and it will return the last autonumber inserted by your connection.
|
Blake Minghelli<br />SCWCD<br /> <br />"I'd put a quote here but I'm a non-conformist"
|
 |
 |
|
|
subject: MSAccess last insert ID ?
|
|
|