"Update Failed. Found 0 records"

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
vvitolo
Posts: 10
Joined: Fri 26 Aug 2005 21:45
Location: S/C de Tenerife

"Update Failed. Found 0 records"

Post by vvitolo » Tue 30 Aug 2005 23:19

Hi,
"Update Failed. Found 0 records", raise when Post or Delete records, using TMyTable, CheckRowVersion := True, StrictUpdate True or False (is the same in both cases), and in the table thereis one datefield without value.
Any idea about?

Best regards,
Victor

GEswin
Posts: 186
Joined: Wed 03 Nov 2004 16:57
Location: Spain
Contact:

Post by GEswin » Wed 31 Aug 2005 08:17

Best is to add a primary key (Autoinc) to the table.

vvitolo
Posts: 10
Joined: Fri 26 Aug 2005 21:45
Location: S/C de Tenerife

Post by vvitolo » Wed 31 Aug 2005 22:19

Sorry,
I forget to give more data:
"Update Failed. Found 0 records", raise when Post or Delete records, using TMyTable, CheckRowVersion := True, StrictUpdate True or False (is the same in both cases), with PK included and in the table there is one date field without value. If there is a valid value in the Date Field, at the first post (Append, Post and then Commit), there is no error.
Any idea about?

Best regards,
Victor

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 01 Sep 2005 06:10

Please specify if you set SQLUpdate or SQLDelete properties

vvitolo
Posts: 10
Joined: Fri 26 Aug 2005 21:45
Location: S/C de Tenerife

Post by vvitolo » Thu 01 Sep 2005 06:20

We don´t set SQLUpdate or SQLDelete properties, we use delete over TMyTable object.

swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Post by swierzbicki » Thu 01 Sep 2005 06:24

could you provide the SQL DDL of this table ?
Why not sending Corelab a demo project with all of this ?

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 01 Sep 2005 11:48

We couldn't reproduce the problem.
Please send us (mydac*crlab*com) a complete small sample to demonstrate it and include create table script.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Fri 02 Sep 2005 11:42

Thank you for your sample. It did help us very much.

The reason of the problem is using '0000-00-00 00:00:00' as datetime value since Delphi cannot accept it. Use any acceptablle value or add TIMESTAMP field to field list. The later is more correct.

vvitolo
Posts: 10
Joined: Fri 26 Aug 2005 21:45
Location: S/C de Tenerife

Post by vvitolo » Fri 02 Sep 2005 17:41

Thank you for your help. I'll try to solve our problem adding a valid datetime value in all new created records.

Best Regards

Post Reply