|
-
Nov 15th, 2010, 08:11 PM
#8
Re: Access Database + TableAdapters: Return last ID
The simple answer is that you don't. In order to get the last generated ID you must issue the query immediately after the insert. That's only possible if you're inserting one record at a time. If you're inserting multiple records from a DataTable then it's simply not possible. You basically have three choices:
1. Insert one record at a time and issue a query immediately afterwards.
2. Insert all the data and then re-query the database to get all the data.
3. Use a proper database.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|