pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedpsqlodbc : SOS
3+ messages / 1 participants
[nested] [flat]
* psqlodbc : SOS
@ 2003-02-05 14:59 mjoseph@inautix.com
0 siblings, 0 replies; 3+ messages in thread
From: mjoseph@inautix.com @ 2003-02-05 14:59 UTC (permalink / raw)
To: pgsql-odbc
Hi,
I am using the psqlodbc ODBC driver. I have a few problems. I was wondering
if you could help.
I am using Visual C++ to develop my app. I need to access a byte array
(bytea) field.
1. I use the Windows ODBC api to insert the byte array ( a photograph). I
do multiple SQLPutData() calls. This application works fine with Access.
But with PostgreSQL, it fails. A number gets inserted instead (5 bytes).
2. I tried using MFC's ODBC support. In the CRecordSet's
DoFieldExchange(CFieldExchange* pFX) method, I setup the binding as below.
RFX_Binary(pFX, _T("[data]"), m_data, 100*1024);
100K I assume is the upper limit of the field. THis works on Access but not
for PostgreSQL. The default limit of 255 is not overridden.
If any of these are known issues, could you let me know. If you have any
ideas as to how I can set this right, please get back to me.
3. The psqlodbc faq when discussing Large Objects suggests creating a new
type like this.
create type lo (
internallength=4,
externallength=10,
input=int4in,
output=int4out,
default='',
passedbyvalue
);
How should I define the input and output functions. Would you be able to
pass on some sample code?
Regards,
Manoj
^ permalink raw reply [nested|flat] 3+ messages in thread
* psqlodbc : SOS
@ 2003-02-06 04:13 mjoseph@inautix.com
0 siblings, 0 replies; 3+ messages in thread
From: mjoseph@inautix.com @ 2003-02-06 04:13 UTC (permalink / raw)
To: pgsql-odbc
Hi,
I am using the psqlodbc ODBC driver. I have a few problems. I was wondering
if you could help.
I am using Visual C++ to develop my app. I need to access a byte array
(bytea) field.
1. I use the Windows ODBC api to insert the byte array ( a photograph). I
do multiple SQLPutData() calls. This application works fine with Access.
But with PostgreSQL, it fails. A number gets inserted instead (5 bytes).
2. I tried using MFC's ODBC support. In the CRecordSet's
DoFieldExchange(CFieldExchange* pFX) method, I setup the binding as below.
RFX_Binary(pFX, _T("[data]"), m_data, 100*1024);
100K I assume is the upper limit of the field. THis works on Access but not
for PostgreSQL. The default limit of 255 is not overridden.
If any of these are known issues, could you let me know. If you have any
ideas as to how I can set this right, please get back to me.
3. The psqlodbc faq when discussing Large Objects suggests creating a new
type like this.
create type lo (
internallength=4,
externallength=10,
input=int4in,
output=int4out,
default='',
passedbyvalue
);
How should I define the input and output functions. Would you be able to
pass on some sample code?
Regards,
Manoj
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: psqlodbc : SOS
@ 2003-02-06 05:59 mjoseph@inautix.com
0 siblings, 0 replies; 3+ messages in thread
From: mjoseph@inautix.com @ 2003-02-06 05:59 UTC (permalink / raw)
To: pgsql-odbc
Hi,
I got the answer to my problem 2. I was looking at an upper limit of
100 * 1024 bytes (100 K). The ODBC configuration, by default, specifies the
'Max LongVarChar' size to be 8190 bytes. Making it 100K solved that
problem.
Regards,
Manoj
mjoseph@inautix.com
Sent by: To: pgsql-odbc@postgresql.org
pgsql-odbc-owner@post cc:
gresql.org Subject: [ODBC] psqlodbc : SOS
02/06/03 09:43 AM
Hi,
I am using the psqlodbc ODBC driver. I have a few problems. I was wondering
if you could help.
I am using Visual C++ to develop my app. I need to access a byte array
(bytea) field.
1. I use the Windows ODBC api to insert the byte array ( a photograph). I
do multiple SQLPutData() calls. This application works fine with Access.
But with PostgreSQL, it fails. A number gets inserted instead (5 bytes).
2. I tried using MFC's ODBC support. In the CRecordSet's
DoFieldExchange(CFieldExchange* pFX) method, I setup the binding as below.
RFX_Binary(pFX, _T("[data]"), m_data, 100*1024);
100K I assume is the upper limit of the field. THis works on Access but not
for PostgreSQL. The default limit of 255 is not overridden.
If any of these are known issues, could you let me know. If you have any
ideas as to how I can set this right, please get back to me.
3. The psqlodbc faq when discussing Large Objects suggests creating a new
type like this.
create type lo (
internallength=4,
externallength=10,
input=int4in,
output=int4out,
default='',
passedbyvalue
);
How should I define the input and output functions. Would you be able to
pass on some sample code?
Regards,
Manoj
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2003-02-06 05:59 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-02-05 14:59 psqlodbc : SOS mjoseph@inautix.com
2003-02-06 04:13 psqlodbc : SOS mjoseph@inautix.com
2003-02-06 05:59 Re: psqlodbc : SOS mjoseph@inautix.com
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox