Record Integer field using parameter as string

The official tester's forum for ZeosLib 7.1. Ask for help, post proposals or solutions.
Post Reply
adilsonpazzini
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: 16.10.2013, 16:37

Record Integer field using parameter as string

Post by adilsonpazzini »

I'm changing my component to zeos BDE.
Windows 7, Delphi7 , ZEOS 7.1 .
I have the database a field of type Integer, ai in ZEOS qndo I add or change the record infomando its value as String, it is lost, generating a completely different number.

Example.

ZQuery.sql.add ('UPDATE SET TABLE_TEST CAMPO_INTEGER =: VALUE_INTEGER');

ZQuery.parambyname ('VALUE_INTEGER'). AsString: = '100 ';
ZQuery.execsql;

After recording, save it once eM field Integer value equal to 100, he writes a negative numbering.

This does not happen in the BDE. I do not know if it's a bug or if vo having to readjust all my code to not write that way anymore.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: Record Integer field using parameter as string

Post by EgonHugeist »

Hi,

which database are you using for this case? Are there special settings? Some more informations would be helpfull.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
adilsonpazzini
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: 16.10.2013, 16:37

Re: Record Integer field using parameter as string

Post by adilsonpazzini »

Firebird 2.5.2
Character Set ISO8859_1 with PT_BR ;


Adilson .
adilsonpazzini
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: 16.10.2013, 16:37

Re: Record Integer field using parameter as string

Post by adilsonpazzini »

I'm using the database Firebird 2.5.2 32 Bits
BD Character Set ISO8859_1 , Collate PT_BR .

But for connection with ZEOS'm not specifying anything regarding the Character set of the database.

ZConection.ClientCodepage: = 'UNICODE_FSS';
ZConection.ContrlsCodePage := cGET_ACP


thank you

Adilson Pazzini .
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: Record Integer field using parameter as string

Post by EgonHugeist »

Got the bug. Patch done R2840 \testing-7.2. It was a wrong conversion of the string to Integer in ZDbcFirebirdUtils.pas. Checkout the branch to test it.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
adilsonpazzini
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: 16.10.2013, 16:37

Re: Record Integer field using parameter as string

Post by adilsonpazzini »

Egon, I appreciate the help, more just to understand, I was using version 7.1 stable, I'll have to try to install this version 7.2, confirm?
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: Record Integer field using parameter as string

Post by EgonHugeist »

Yes. We need some more testers and bugfixes always start in the testing branches. Ever worked with SVN?

Or open \dbc\ZDbcInterbaseUtils.pas
replace line 2543 with:
SQL_LONG : PInteger (sqldata)^ := StrToInt(String(Value)); //AVZ
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
adilsonpazzini
Fresh Boarder
Fresh Boarder
Posts: 8
Joined: 16.10.2013, 16:37

Re: Record Integer field using parameter as string

Post by adilsonpazzini »

yes, I will update here so, here I take the tests, ai post here the result.

Again thank you.

Adilson Pazzini
Post Reply