February 15, 2006 at 6:35 am
Hi
I've created a dataAdapter with a SelectCommand,
a DeleteCommand and an InsertCommand.
The DeleteCommand should delete all the records in the table and the InsertCommand add new records.
When I do dataAdapter.Update I receive
An unhandled exception error.
If I remove the DeleteCommand everything works fine.
Any ideas ?
February 15, 2006 at 10:56 am
could be permissions, referential integrity
Are you using a stored proc for the delete command or dynamic sql?
(number of output parameters match?)
February 15, 2006 at 12:10 pm
I'm using the Data Adapter Configuration Wizard.
The delete is from the DeleteCommand of the dataAdapter.Update.
How do I know the order of events in the dataAdapter.Update command?
February 15, 2006 at 1:54 pm
for update you need to specify the update command also
for the microsoft help on dataadapter.update
February 16, 2006 at 5:58 am
David,
Place the code in a try... catch block and extract the error message
e.g
try{
YourStuff();
}
catch(Exception ex){
MessageBox.Show(ex.Message);
}
This will give you a better idea of what is happening.
regards
Shaun
Quis custodiet ipsos custodes.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply