This week's book giveaway is in the Cloud forum.
We're giving away four copies of The Business Blockchain and have William Mougayar on-line!
See this thread for details.
Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MSAccess last insert ID ?

 
andrew beales
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Eddie Vanda
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may need to synchronize the two JDBC calls in case another client comes in and adds a record in between your two calls.
 
Blake Minghelli
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic