weird ADO behaviour

yoni

New member
Joined
Aug 5, 2003
Messages
2
Hi,
I have plan dataset with two tables.
Im using oledbcommand to delete records from access db.
The oledbcommand simply call access query
with parameters which are defined in the oledbcommand.

When im calling the oledbAdapter.update(dataset , dataTable) method and there are more than one row(!) in one of the tables, i receive the following error message:
"Concurrency violation: the DeleteCommand affected 0 records".

Then i tried new thing.
Im iterating manually all over the dataset rows and calling
oledbDataAdapter.update(dataRow) method for each single row.
This works fine.

Any idea why this happens??

Thanks,
Yoni
 
The error you mentioned appears if the data adapter is trying to delete a row that has been already deleted or doesnot exist in the database, try checking your cascading between the two tables, it may be the cause....
 
Back
Top