INSERT statement fails in Datagrid

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have hardcoded method to populate (Select), delete and update a database
table through a datagrid, these 3 operations work, but all inserts fail.

I have noted that when i add a row to the datagrid (insert), all columns have
a defult value of (null) assigned to them prior to the insert.

Once i have added my data, the insert still fails - even if i assign the next
number in sequence to the primary key field.

The error generated is a system error.

I have the following line of code to handle the primary key in each
operation

cmd.Parameters["PrimaryKeyField"].SourceVersion = DataRowversion.Original

Any suggestions

Thanks
 
What specifically is the system error?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Back
Top