on duplicate key update --> Update failed: 2 Records found

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mariusz
Posts: 62
Joined: Wed 16 Jul 2008 21:04
Location: Poland / Poznan
Contact:

on duplicate key update --> Update failed: 2 Records found

Post by mariusz » Sun 19 Jul 2009 21:31

Hello!

I have TMyQuery and TMyUpdateSQL. In the Update statment I'm using
"insert into table () values () on duplicate key update field = :xxx".

During insert, MySQL return 1 updated / inserted record but during update - 2 records. It raise my application error (like in the topic).

What can I do, to provide it?

best regards
Mariusz

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 20 Jul 2009 14:46

To solve the problem you should set the Options.StrictUpdate property to false.

Post Reply