Delphi 2010, Zeos 7 and parameters

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Delphi 2010, Zeos 7 and parameters

Post by zippo »

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 :)
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

BTW: How do I report the accurate verrsion of Zeos 7 ?
jeremicm
Senior Boarder
Senior Boarder
Posts: 61
Joined: 18.10.2006, 17:07
Contact:

Post by jeremicm »

take a look at version property of ZConnection...

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;
Also instead of using

Code: Select all

Qry.Sql.Text := 'INSERT INTO names (ID, FIRST, LAST) Values (:ID, :FIRST, :LAST)';
i reccomend to use

Code: Select all

qry.sql.clear
qry.sql.add('INSERT INTO names (ID, FIRST, LAST) Values (:ID, :FIRST, :LAST)');
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

Ok, I Will try and report here.
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

Tried - unofrtunatly there's the problem persists.. :(
bravecobra
Junior Boarder
Junior Boarder
Posts: 29
Joined: 31.10.2005, 00:09
Location: Antwerp
Contact:

Post by bravecobra »

What's the revision of your svn checkout?
Brave Cobra
bravecobra.com
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

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
Image
Locked