Hello!
I noticed a strange behaviour of Zeos7 on Delphi 2010. If I execute something like this:
Qry.Sql.Text := 'INSERT INTO names Values (:ID, :FIRST, :LAST)';
Qry.ParameterByName('ID').AsInteger := 9;
Qry.ParameterByName('FIRST').AsString := 'X';
Qry.ParameterByName('LAST').AsString := 'Y';
Qry.ExecSQL;
Instead of this:
ID FIRST LAST
--------------------
9 X Y
I get table values like this:
ID FIRST LAST
--------------------
9 9 9
I hecked the param values just before execution and the values are OK. I think it's somewhere inside Zeos.
Hope it helps to improve my favorite components
Delphi 2010, Zeos 7 and parameters
Moderators: gto, EgonHugeist, olehs
take a look at version property of ZConnection...
and for query try:
Also instead of using
i reccomend to use
and for query try:
Code: Select all
Qry.Sql.Text := 'INSERT INTO names (ID, FIRST, LAST) Values (:ID, :FIRST, :LAST)';
Qry.ParameterByName('ID').AsInteger := 9;
Qry.ParameterByName('FIRST').AsString := 'X';
Qry.ParameterByName('LAST').AsString := 'Y';
Qry.ExecSQL;
Code: Select all
Qry.Sql.Text := 'INSERT INTO names (ID, FIRST, LAST) Values (:ID, :FIRST, :LAST)';
Code: Select all
qry.sql.clear
qry.sql.add('INSERT INTO names (ID, FIRST, LAST) Values (:ID, :FIRST, :LAST)');
-
- Junior Boarder
- Posts: 29
- Joined: 31.10.2005, 00:09
- Location: Antwerp
- Contact:
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
zippo,
For reporting the 7.x version :
- When using SVN : branch + revision
- When using packaged download : what's the name of the file (or the branch and revision parts for snapshots)
Concerning the parameters problem:
- What's the used database?
- What SQL is the TZSQLMonitor reporting for the update part?
Mark
For reporting the 7.x version :
- When using SVN : branch + revision
- When using packaged download : what's the name of the file (or the branch and revision parts for snapshots)
Concerning the parameters problem:
- What's the used database?
- What SQL is the TZSQLMonitor reporting for the update part?
Mark