Concurrency error, but is it?
Posted: Thu 09 Aug 2007 20:50
In my application I issue an Update command on a MySQLDataTable. The control attempts to update 8 rows. The first 7 process without error. The 8th comes back with a DBConcurrencyError: the Update Command affected 0 of the expected 1 rows.
When I examine the command using the DBMonitor I see what I believe to be correct SQL, along with valid params being passed. A debug walkthrough indicates that none of my rows has errors. And in the Error tab of the DBmonitor it indicates "Completed successfully". Yet the DBMonitor agrees that "-- 0 row(s) affected. "
It is possible in my application that none of my fields have actually changed, but that I'm tripping the RowState to modified in the manner in which I'm assigning values (since the assigned values may be the same as the original across all fields).
Is it possible that in this case the update command would return 0 rows affected? If so, how do I prevent the Update command from exiting and throwing this exception?
Or am I misunderstanding where it says "command complete" in the errors tab of the DBMonitor? If indeed a valid error is being thrown, can you recommend some manner in which I can dig in to understand what is causing this error so I can rectify it?
FYI, VB 2005, CoreLab 3.55.20, MySQL 5.0
Thanks,
John
When I examine the command using the DBMonitor I see what I believe to be correct SQL, along with valid params being passed. A debug walkthrough indicates that none of my rows has errors. And in the Error tab of the DBmonitor it indicates "Completed successfully". Yet the DBMonitor agrees that "-- 0 row(s) affected. "
It is possible in my application that none of my fields have actually changed, but that I'm tripping the RowState to modified in the manner in which I'm assigning values (since the assigned values may be the same as the original across all fields).
Is it possible that in this case the update command would return 0 rows affected? If so, how do I prevent the Update command from exiting and throwing this exception?
Or am I misunderstanding where it says "command complete" in the errors tab of the DBMonitor? If indeed a valid error is being thrown, can you recommend some manner in which I can dig in to understand what is causing this error so I can rectify it?
FYI, VB 2005, CoreLab 3.55.20, MySQL 5.0
Thanks,
John