Parameter data_cad not found

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
htiuk
Posts: 2
Joined: Fri 26 Oct 2007 14:24
Location: Brazil

Parameter data_cad not found

Post by htiuk » Fri 26 Oct 2007 14:48

i have this message 'Parameter data_cad not found' in the code:

TMyQuery1.Close;
TMyQuery1.SQL.Clear;
TMyQuery1.SQL.Add('UPDATE clientes1 SET ('data_cad=:dt_cad,
'data_alt = :dt_alt');
TMyQuery1.Execute;

Delphi 2007 and MyDac 5.10.0.10

htiuk
Posts: 2
Joined: Fri 26 Oct 2007 14:24
Location: Brazil

Ops Correcting

Post by htiuk » Fri 26 Oct 2007 14:54

i have this message 'Parameter data_cad not found' in the code:

TMyQuery1.Close;
TMyQuery1.SQL.Clear;
TMyQuery1.SQL.Add('UPDATE clientes1 SET data_cad=:dt_cad,
'data_alt = :dt_alt');
TMyQuery1.ParamByName('dt_cad').AsDate := Date;
TMyQuery1.ParamByName('dt_alt').AsDate := Date;
TMyQuery1.Execute;

Delphi 2007 and MyDac 5.10.0.10

eduardosic
Posts: 387
Joined: Fri 18 Nov 2005 00:26
Location: Brazil

Hi.. MyDac Works Fine..

Post by eduardosic » Fri 26 Oct 2007 16:30

htiuk wrote:i have this message 'Parameter data_cad not found' in the code:

TMyQuery1.Close;
TMyQuery1.SQL.Clear;
TMyQuery1.SQL.Add('UPDATE clientes1 SET data_cad=:dt_cad,
'data_alt = :dt_alt');
TMyQuery1.ParamByName('dt_cad').AsDate := Date;
TMyQuery1.ParamByName('dt_alt').AsDate := Date;
TMyQuery1.Execute;

Delphi 2007 and MyDac 5.10.0.10
Hi htiuk, myDac Works Fine... see you database script and your code..

incorrect:
TMyQuery1.SQL.Add( 'UPDATE clientes1 SET data_cad=:dt_cad,
'data_alt = :dt_alt');

correct:
TMyQuery1.SQL.Add( 'UPDATE clientes1 SET data_cad=:dt_cad, data_alt = :dt_alt' );


i made a simple example for you..
http://www.drdsistemas.com/util/bugmyda ... Update.zip

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

Post by Antaeus » Mon 29 Oct 2007 10:04

To htiuk:
Has the eduardosic's example helped you so solve this problem?

Post Reply