By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,953 Members | 1,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,953 IT Pros & Developers. It's quick & easy.

Error during tableAdapter.update does not trigger an exception

P: n/a
My situation compares to this: I have two tables parentTable(id, foreignId)
and childTable(id, value). "foreignId" in the "parentTable" references "id"
in "childTable". The constraint is by default set to "ON DELETE NO ACTION"
(using sql server 2005), which means the delete fails if there are related
records in the childTable.

My main problem is that when I use the datatable.Remove() method and later
execute the tableadapter.update() method, the record isn't deleted on the
database server, however it is removed from the datatable.rows
rowcollection. There are no exception thrown when the delete command fails
for the record flagged for deletion in the tableadapter.

My question is: How can I handle this concurrency problem? In an elegant
way. I imagine the sane end result is to report about the failed delete, and
keep the record flagged for deletion in the datatable, or return the record
to the original datatable.

Thank you.

- Magnus
Sep 8 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Never mind the question, its sorted.
Sep 8 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.