Hi to everybody, first at all, thanks very much to all people do possible these great components and all of one help us in this forum.
My problem is:
With MySQL Server 5.0, Zeos 7.0 and Delphi 2010. If I test this:
ZQuery1.Close;
ZQuery1.SQL.Clear;
ZQuery1.SQL.Add('select * from table1 where field1= :param1');
ZQuery1.Params.ParamByName('param1').Value:=variable1;
ZQuery1.Open;
It launch an exception with the message of a sintax error in SQL command.
Monitoring commands to MySQL I see this sentence:
select * from table1 where field1=
Like empty param ????? But debugging I can see that variable1 has a value.
Params Empty MySQL 5-Delphi 2010-Zeos 7
Moderators: gto, EgonHugeist, olehs
Params Empty MySQL 5-Delphi 2010-Zeos 7
Last edited by zhalcon on 05.04.2010, 13:58, edited 2 times in total.
-
- Junior Boarder
- Posts: 29
- Joined: 31.10.2005, 00:09
- Location: Antwerp
- Contact:
Since this resembles my experience perfectly...there is/was a bug concerning D2010 since widestrings are used there to pass param values instead of ansistrings.
I provided the patch here: http://zeos.firmos.at/viewtopic.php?t=2659. It has been commited to the trunk as rev 770, so you can update your checkout and try again.
If the problem persists, let us know.
I provided the patch here: http://zeos.firmos.at/viewtopic.php?t=2659. It has been commited to the trunk as rev 770, so you can update your checkout and try again.
If the problem persists, let us know.
Brave Cobra
bravecobra.com
bravecobra.com
Sorry, I've erased by error the question, repeat here
Thanks very much, Brave, I've downloaded your patch, because I don't know how download the REV 770 from SVN. I'll test it and write here the result.
I'll change ZDbcMySqlStatement.pas adding stUnicodeString like I've seen in your patch, build Zeos again and test it.
Again, thanks very much for your fast help.
I'll change ZDbcMySqlStatement.pas adding stUnicodeString like I've seen in your patch, build Zeos again and test it.
Again, thanks very much for your fast help.
FIX !!!
Hi Brave, certainly it was the answer. I applied your patch to ZDbcMySqlStatement.pas and it run OK.
Then, I saw another extrange thing. I used Zeos 6.5.1 and with that version, in ZQuerys linked like master and detail (by properties masterfield and mastersource, etc), when I inserted a record on detail, automatically, the keyfields on ZQuery detail were filled with the values of master ZQuery, but with Zeos 7 they are not. I had to fill property "LinkedFields" with the keyfields of detail to do automatically filled.
Thanks very much for your help, Brave.
Then, I saw another extrange thing. I used Zeos 6.5.1 and with that version, in ZQuerys linked like master and detail (by properties masterfield and mastersource, etc), when I inserted a record on detail, automatically, the keyfields on ZQuery detail were filled with the values of master ZQuery, but with Zeos 7 they are not. I had to fill property "LinkedFields" with the keyfields of detail to do automatically filled.
Thanks very much for your help, Brave.
Hi,
I have the same Problem with real Unicode parameters. I tried these:
But the GetEscapeString Method is called with AnsiStrings, so that my Query has is 0.
Is there any fix?
Thanks,
slaut
I have the same Problem with real Unicode parameters. I tried these:
Code: Select all
Query.SQL.Text := 'SELECT COUNT( IMPERIUM ) ANZ FROM IMPERIUM WHERE IMPERIUM = :IMP';
Query.ParamByName('IMP').AsString := '≡δŊΛ©Ξlөρюŋſ≡';
Is there any fix?
Thanks,
slaut