"Update Failed. Found 0 records"

"Update Failed. Found 0 records"

Postby 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
vvitolo
 
Posts: 10
Joined: Fri 26 Aug 2005 21:45
Location: S/C de Tenerife

Postby GEswin » Wed 31 Aug 2005 08:17

Best is to add a primary key (Autoinc) to the table.
GEswin
 
Posts: 186
Joined: Wed 03 Nov 2004 16:57
Location: Spain

Postby 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
vvitolo
 
Posts: 10
Joined: Fri 26 Aug 2005 21:45
Location: S/C de Tenerife

Postby Ikar » Thu 01 Sep 2005 06:10

Please specify if you set SQLUpdate or SQLDelete properties
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby vvitolo » Thu 01 Sep 2005 06:20

We don´t set SQLUpdate or SQLDelete properties, we use delete over TMyTable object.
vvitolo
 
Posts: 10
Joined: Fri 26 Aug 2005 21:45
Location: S/C de Tenerife

Postby 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 ?
swierzbicki
 
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Postby 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

Postby 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.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby 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
vvitolo
 
Posts: 10
Joined: Fri 26 Aug 2005 21:45
Location: S/C de Tenerife


Return to MySQL Data Access Components