StrictUpdates

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
teunis
Posts: 48
Joined: Wed 01 Feb 2006 14:15
Location: Curacao

StrictUpdates

Post by teunis » Sat 24 Feb 2007 20:57

Delphi 6 program runs fine with 1 user also with 2 users but since a third user joined the
club I get "Update failed. more than 1 records etc."
I don't want to change MycustomDataSet.Options.Strictupdates to FALSE
But how come?
My tables all have a key field that is autoincremented and a PRIMARY index.
I use INSERT INTO for addition with 0 for the key value or
REPLACE INTO with the appropiate key value for editing.
The used DBGrids are all ReadOnly.
Unfortunately it never happens when I am there.
Should I TRY EXCEPT all my Q.Executes to find the error?
Tip for the error message. Can you name the table involved.
Teunis
:roll:

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 26 Feb 2007 11:54

As a rule this error happens in the following situation:
- two users open the same table;
- the first user deletes a record or changes the primary key of the record;
- the second user tries to delete or update the record affected by the first user.

> Should I TRY EXCEPT all my Q.Executes to find the error?
It is unlikely that this error happens when you call the Execute method.

> Tip for the error message. Can you name the table involved.
Probably enabling logging on your server will help to determine the reason of the problem.

Post Reply