473,378 Members | 1,449 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Error during tableAdapter.update does not trigger an exception

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
1 2276
Never mind the question, its sorted.
Sep 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: M | last post by:
Hello, I have a very simple table, and want to create a trigger that updates the date column entry (with the current date), whenever a row gets modified. Is there a simple way of fixing this,...
2
by: Rhino | last post by:
I am trying to write a trigger/UDF combination that closely follows the example given in the following DeveloperWorks article:...
0
by: JSantora | last post by:
Essentially, InsertAT is broken! For the past couple of hours, I've been getting this "Parameter name: '-2147483550' is not a valid value for 'index'." error. Apparently, its caused by having...
3
by: Mike | last post by:
Dear Group, When I add a DataTable to a Typed Dataset, and a TableAdapter to the DataTable, I am able to create methods to send updates directly to the database (GenerateDBDirectMethods),...
15
by: philip | last post by:
On a form, I have a datagridview. This datagridview is constructed on a dataset filled by a tableadapter. The table adapter do very well what it must do when filling dataset. Insertions,...
3
by: teddysnips | last post by:
I need a trigger (well, I don't *need* one, but it would be optimal!) but I can't get it to work because it references ntext fields. Is there any alternative? I could write it in laborious code...
2
by: Richard | last post by:
Our web programmer was looking in his application log an found the following error: 2006-08-31 16:33:35,129 ERROR org.hibernate.util.JDBCExceptionReporter - < SQL0723N An error occurred in a...
0
by: Johan Neidenmark | last post by:
When i try to run this SQL statements in iSeries Access for windows (against my customers db2) i get: SQL State: 42904 Vendor Code: -7032 Message: SQL procedure, function, or trigger...
2
by: Alex | last post by:
I am using a web service to update some database fields. I used the dataset designer to define my datatable and tableadapter. I had it automatically create the insert, update, and delete...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.