Re: [GENERAL] libpq (C++) - Insert binary data

2010-10-01 Thread Merlin Moncure
On Fri, Oct 1, 2010 at 3:08 AM, John R Pierce wrote: >  On 09/30/10 11:58 PM, GOO Creations wrote: >> >>  thanks for this tip, but as far as I understand it libpqtypes is not part >> of the original lipq libary . >> This will result in the same problem as with the Qt libraries, it will add >> anot

Re: [GENERAL] libpq (C++) - Insert binary data

2010-10-01 Thread John R Pierce
On 09/30/10 11:58 PM, GOO Creations wrote: thanks for this tip, but as far as I understand it libpqtypes is not part of the original lipq libary . This will result in the same problem as with the Qt libraries, it will add another dependecy to my plugin, which is not allowed. take the source

Re: [GENERAL] libpq (C++) - Insert binary data

2010-09-30 Thread GOO Creations
thanks for this tip, but as far as I understand it libpqtypes is not part of the original lipq libary . This will result in the same problem as with the Qt libraries, it will add another dependecy to my plugin, which is not allowed. Chris On 2010/09/30 10:59 PM, Merlin Moncure wrote: On Thu,

Re: [GENERAL] libpq (C++) - Insert binary data

2010-09-30 Thread Christian Ullrich
* GOO Creations wrote: This is what I have until now to insert data char *query = "insert into table1 (bytes) values ($1)"; QByteArray chip = ; const char *data = chip->data(); const char* params[]={data}; const int params_length[]={chip->length()}; const int params_format[]={1}; result = PQexe

Re: [GENERAL] libpq (C++) - Insert binary data

2010-09-30 Thread Merlin Moncure
On Thu, Sep 30, 2010 at 11:42 AM, GOO Creations wrote: >  Yes there is a reason I'm not using Qt's libraries. Qt doesn't come out > with PSQL as default driver (meaning you have to manually download the > driver for Qt postgres). I'm developing a plugin for an app that restricts > Qt, no extra dep

Re: [GENERAL] libpq (C++) - Insert binary data

2010-09-30 Thread GOO Creations
Yes there is a reason I'm not using Qt's libraries. Qt doesn't come out with PSQL as default driver (meaning you have to manually download the driver for Qt postgres). I'm developing a plugin for an app that restricts Qt, no extra depedncies are allowed. But the app has libpq as dependcy, so I

Re: [GENERAL] libpq (C++) - Insert binary data

2010-09-30 Thread Steve Atkins
On Sep 30, 2010, at 8:26 AM, GOO Creations wrote: > Hi there, > > I'm sitting for days now, and I can't get this to work: > > I want to insert binary data (bytea) into my postgres DB via the c++ libpq. > > What I have is a char* (actually a QByteArray) and I want to insert it into > the DB an

Re: [GENERAL] libpq (C++) - Insert binary data

2010-09-30 Thread GOO Creations
I've worked through that already, without any success. This is what I have until now to insert data char *query = "insert into table1 (bytes) values ($1)"; QByteArray chip = ; const char *data = chip->data(); const char* params[]={data}; const int params_length[]={chip->lengt

Re: [GENERAL] libpq (C++) - Insert binary data

2010-09-30 Thread Vincenzo Romano
2010/9/30 Vincenzo Romano : > 2010/9/30 GOO Creations : >>  Hi there, >> >> I'm sitting for days now, and I can't get this to work: >> >> I want to insert binary data (bytea) into my postgres DB via the c++ libpq. >> >> What I have is a char* (actually a QByteArray) and I want to insert it into >>

Re: [GENERAL] libpq (C++) - Insert binary data

2010-09-30 Thread Grzegorz Jaśkiewicz
If you use QT, it has PG connector classes I believe (it had in 3.x). -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] libpq (C++) - Insert binary data

2010-09-30 Thread Vincenzo Romano
2010/9/30 GOO Creations : >  Hi there, > > I'm sitting for days now, and I can't get this to work: > > I want to insert binary data (bytea) into my postgres DB via the c++ libpq. > > What I have is a char* (actually a QByteArray) and I want to insert it into > the DB and the retrieve it from there

[GENERAL] libpq (C++) - Insert binary data

2010-09-30 Thread GOO Creations
Hi there, I'm sitting for days now, and I can't get this to work: I want to insert binary data (bytea) into my postgres DB via the c++ libpq. What I have is a char* (actually a QByteArray) and I want to insert it into the DB and the retrieve it from there again. I can't find any good exampl