|
-
Mar 25th, 2004, 07:23 AM
#1
Thread Starter
New Member
dataset grief, addnew row issues
I have a dataset which contains a employee table (similar to that in the nwind db).
I use the NewRow method of the table to get a datarow object then fill this with my new data.
At this point the 'EmployeeID field of the datarow is 0.
I then add this new row to tables row collection.
I then call the update method of the data adaptor.
The new row is inserted into the DB but the EmployeeID field is still 0.
How do i get the ID field of the added row to be filled in 'automatically'.
(For every new row that i add to the DS the EmployeeID is 0 - this is no good).
Do i have to write code to requery the added row and get the ID etc
(I'm using SQL and Access DBs in a multi-user environment).
Thanks for help in advance.
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
|