Writing back to DataAdapter & DB

cmanning

Member
Joined
Feb 18, 2003
Messages
8
Ive created a VB app that calls data from a MS Access 2000 DB. The code pulls the data correctly and places it into the various txt boxes. However when I try to write any changed data back to the DB I get an error (see below). The data will write back fine to the data set. Its just the connection between the dataset and the data adapter that doesnt seem to be working. Help?!!??!!

Code nugget used:
Sub btnSave_ClickEvent(blah..........., blah......)
dataAdapterName.Update(objDataSet, "login")
End Sub

Error:
An unhandled exception of type System.InvalidOperationException occurred in

system.data.dll

Additional information: Update requires a valid UpdateCommand when passed DataRow collection

with modified rows.
 
Nevermind. Figured it out. I needed to add the insert command to existing data adapter....the one I listed here only had the read command.

Thanks anyway.
 
Back
Top