Problem refreshing DataTable
Hello all,
Problem:
1. Form1 opens and DataTables dt1 and dt2 are filled through DataAtapters da1 and da2 and SQL Server stored procedures.
2. A new record is added to dt1 through da1.InsertCommand. This is a stored procedure that creates the record in dt1 but also creates a corresponding record in dt2.
3. Because dt2 is now out-of-date da2.Fill is called.
4. An error results:
"Failed to enable constraints. One or more rows contain values violating non-null, unique or foreign-key constraints."
As far as I can tell there are no such constraints on dt2.
The really strange thing is I can close and reopen Form1 without a problem even though dt2 is filled with the exact same data as in step 3.
Any ideas why this is happening?
Thank you,
jmatt