[Lazarus] Access to PostgreSQL

Marc Weustink marc at dommelstein.net
Sat Feb 20 17:19:42 CET 2010


Pino Zollo wrote:
>> Pino Zollo wrote:
>>> Hi to the list.
>>>
>>> I am experimenting the features of lazarus, so I made a small program for
>>> reading from a PostgreSQL database.
>>>
>>> It happens the following problem:
>>>
>>> Fields of type "text" are shown as (blob)
> 
> Hi Marc,
> 
>> True, iirc strings longer than 255 chars are teruned as blob.
> 
> They are defined as TEXT....as you can see in the psql results, some field is 
> empty and still I get a (blob).

Correct. A grid cannot show blobs. In order to know it is empty, it must 
read it first. So you will always see (blob). This is why I for my 
current project at work choose a varchar(255) (or shorter) for text, 
since it mostly contained labels and captions. These will be returned as 
string.

>>> Fields of type "real" are mis-interpreted   values E-315 !!
>> How did you define those columns in the DB ?
> 
> TEXT and REAL

did you try DOUBLE ?

> Then I noticed that also times are returned without seconds.
> 
> It seems a lot of bugs !

I think you just hit some

> 
> I wonder if there is around some tutorial with simple examples about DB with 
> Lazarus in Linux....and if it is any useful Lazarus at all. 

I guess so, but I don't know. I've not done any serious DB programming 
in Lazarus (thats my daytime job in Delphi, where we use zeos+postgres)

>> PS. zipping an png is not really usefull.
> 
> Not for who, like me, access to Internet via a cel-phone in GPRS and pays 3 $ 
> for a total of 5Mb (Received+Transmitted)...

Srry, I didn't realize that you can compress .png more.

> So is the life here in the country side of Paraguay !

:)

Marc





More information about the Lazarus mailing list