Page 1 of 1

[patch_done] An Error in zeos 7, last svn

Posted: 27.04.2012, 00:19
by cpalx
I use zeos 7.0 (last svn) in lazarus (0.9.31)

when i make a query like

select -1.25 as num

and i want to show in lazarus. display always positive ( 1.25 ). This onlye in real numbers.

The problem is Zeos, i used PQconecction and works ok.

any idea?

Posted: 27.04.2012, 18:40
by EgonHugeist
cpalx,

which engine do you use here? PostgreSQL?

Michael

Posted: 27.04.2012, 20:00
by ism

Code: Select all

select -1.25 as num
Try do this with stranded Lazarus components

Or replace . on ,

Better execute in this http://www.sqlmanager.net/en/products/p ... ql/manager

Posted: 27.04.2012, 20:33
by markus
ism wrote:

Code: Select all

select -1.25 as num
Try do this with stranded Lazarus components

Or replace . on ,

Better execute in this http://www.sqlmanager.net/en/products/p ... ql/manager
This bug do exist - simple test case:
Put ZComponent and ZQuery on a form. Configure Your pgsql connection.
Enter Query text just like cpalx wrote: "select -1.25 as num
and then do:
ZQuery1->Active = true;
double tmp = ZQuery1->FieldByName("num")->AsFloat;
ShowMessage(FloatToStr(tmp));
ZQuery1->Active = false;

in CBuilder2010 on postgresql 9.0 i got message "1.25" - positive value

Posted: 27.04.2012, 22:20
by ism
You have done what I wrote?
Results ?

Posted: 27.04.2012, 22:56
by EgonHugeist
Sorry guys, wasn't at home.

Patch done Rev.1125\testing and Rev.1126\tesing-egonhugeist

5min work... Confirmed?

Michael

Posted: 27.04.2012, 22:57
by markus
It does work better;)

Posted: 27.04.2012, 23:01
by EgonHugeist
markus,

??? What you mean here?

Posted: 27.04.2012, 23:03
by markus
no no - before Your patch...
i didn't see Your post

With rev 1126 this problem is gone

Posted: 30.04.2012, 22:56
by cpalx
Thanks.