TableAdapters and Commands

rot13

Well-known member
Joined
Jun 12, 2004
Messages
53
I got together with another developer after I tried to figure this stuff out, and neither one of us can figure out UPDATE and DELETE commands...

I am using an Access database, and I have a BindingSource, then a DataSet, and a TableAdapter. I opened up the DataSet designer and tried editing the commands, but I just cant get them to work... its been a frustrating couple of hours... I keep getting exceptions like "Paramater not provided for one or more required paramaters" or w/e... thats basically what it means... and I dont get how to fix it... everything *looks* right... to me.

Does anybody know of a step by step tutorial for this, or does anyone have any advice or help?

Thanks
 
Its a pretty plain problem, but so are the solutions or steps for resolution. Specially if you use DataAdapter and use * as in SELECT * FROM... then see the "region created code" at the top of your forms code, and check all the parameters the DataAdapter made... therell be PLENTY of them. For instance check InsertCommand and write down all of the parameters or fields if you wish.
They (from the error description you gave) MUST ALL be mentioned in the .parameters(n).value = "stringOfSomeKind" also the format of the data entered MUST be in the same format as the database that hold the table (eg. date must be a valid date, integer cannot be string etc.).

Hope this helps...
 
Back
Top