this is the error message

  • Thread starter Thread starter JH
  • Start date Start date
J

JH

This is the error message I receive every time I run the program.

An unhandled exception of type 'System.InvalidOperationException' occurred
in system.data.dll
Additional information: Update requires a valid InsertCommand when passed
DataRow collection with new rows.


help
 
Your program doesn't know how to update the data, since you didn't specify
any insert command, to tell it how to do the insert.
 
I suggest you read up on the dataadapter class, and updating data. There are
tons of articles online. But the idea is that it can't magically happen all
on its own, you will need to define all the commands. There is a
SqlCommandBuilder class that can help generate them.
 
Back
Top