dbTalk Databases Forums  

Variants with LibPQ

comp.databases.postgresql comp.databases.postgresql


Discuss Variants with LibPQ in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
davidcfres
 
Posts: n/a

Default Variants with LibPQ - 10-16-2009 , 05:01 AM






Hi,

I use "LibPQ.dll" to connect a Posgres Database With Delphi 2009.

Did anyone knows how to get a variant representation of query fields ?

All results of queries are pAnsiChar, for example "select 2+2" returns a
pAnsiString "4"

Thanks,

David

Reply With Quote
  #2  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Variants with LibPQ - 10-16-2009 , 10:09 AM






davidcfres wrote:
Quote:
I use "LibPQ.dll" to connect a Posgres Database With Delphi 2009.

Did anyone knows how to get a variant representation of query fields ?

All results of queries are pAnsiChar, for example "select 2+2" returns a pAnsiString "4"
Is Delphi linked with libpq or is there something else
in between (ODBC driver, ...)?

PostgreSQL lets you specify whether you want your query
results sent to the client in string or its internal
binary format.
String is preferred for portability reasons.

It is the responsibility of the code using libpq to convert
the textual representation to any other (client) data type.

So perhaps the PostgreSQL support of Delphi or the connector
it uses is not smart enough to do this correctly.

Yours,
Laurenz Albe

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.