Hi everyone,

I'm having the error msg. "ıbmdadb2" E_FAIL(0X800004005) when I try to delete a row on the dataset.

I populate the table in many combination of selections, no problem. But when I try to delete a line, I can do it on gridview but I cannot do it on database and I get error msg. This is where I get the msg.

foreach (DataGridViewRow row in tblOrderList.SelectedRows)

                            da.Update(ds, "Orders");
                            // refresh the listbox after the delete

                            // inform the user
                            MessageBox.Show("Rows deleted");

I'm the first time user of dataset update,delete,insert . Probably I'm failing in definition there. But things work OK with populating in a variety of approaches. So I appreciate any clue what I might be doing wron


8 Years
Discussion Span
Last Post by DdoubleD

The libraries (IBMDADB2, DLL's, etc) being access for you database from these calls might be out of sync. Which line (DB call) is throwing the error?

Maybe the OLE DB Provider (IBMDADB2) is not properly registered? You might contact IBM support for this driver and see what they have to say about your error.


IBM DB2 is doing quiet well so far, because I have done enough reading, inserting, deleting and updating with datareader, no problem. I have done many populating with dataset/datatable , no problem. This is my first try with dataset.update method and I come accross with this error.
The line I get error is; da.Update( ds,"Orders")

Do I have to provide a delete sql statement like I do in ExecuteNonQuery ?

or do I face a constraint in the database like referential integrity ?

This error message is not very informative, I wish I had a better description of the message.

I think the issue lies here. I populate from database table say "tableR" using where clause which includes "tableS" . When I select to delete I have to delete from "tableS". I think I have to somehow prepare a command to tell dataadapter it should delete from "tables". Because if I delete from "tableR" I might get constraint problem. So how can I point "tableS" to dataadapter so that it operates on that. I hope I did not make it very complicated.



This error message is not very informative, I wish I had a better description of the message.

I guess this is one of those generic catch-all error messages. After some browsing, I've noticed that other applications have somehow hooked into more detailed information related to this error. Does the database or event logs hold details to these error events?

Anyway, wish I could help you more but I don't know your DB, Tables, etc., and there are too many possibilities of what is actually generating this error. Good luck.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.