Page 1 of 1

Zquery have problem when passing parameter

Posted: 18.02.2013, 10:06
by hehe169
Hi,
I have facing a problem on XE2 with zquery, the coding as below:

zquery1.Active:=false;
zquery1.SQL.Clear;
zquery1.SQL.Add('select * from employee_master where employeeno=:p1');
zquery1.ParamByName('p1').value:='ST001';
zquery1.Active:=true;

The runtime error comes out Zquery1 : Parameter p1 not found.

The above coding under Delphi 6,7 with Zeoslib 6.6 is ok, but now have error, please help, thanks

**remark : development is under Window XP with service pack 3**

Posted: 18.02.2013, 11:15
by EgonHugeist
hehe169,

Which protocol do you use here? This is strange our current tests don't show me something like that.

Posted: 18.02.2013, 11:17
by hehe169
I use mysqld-5 protocol.

When complie, there have warning meesage like this :

[DCC Warning] ZExprToken.pas(388): W1063 Widening given AnsiChar constant (#$BF) to WideChar lost information

Any idea?

Posted: 18.02.2013, 14:54
by EgonHugeist
I use mysqld-5 protocol.
I'll test it..
[DCC Warning] ZExprToken.pas(388): W1063 Widening given AnsiChar constant (#$BF) to WideChar lost information

Any idea?
Seems like a Unicode mapping issue on you current CodePage. Hmm no idea i have no such warning..