pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedIODBC32.DLL: Access Violation
6+ messages / 2 participants
[nested] [flat]
* IODBC32.DLL: Access Violation
@ 2002-09-24 02:06 CN LIOU <cnliou@graffiti.net>
0 siblings, 1 reply; 6+ messages in thread
From: CN LIOU @ 2002-09-24 02:06 UTC (permalink / raw)
To: pgsql-odbc
Hi!
psqlODBC 7.02.0002 + PostgreSql 7.2.1 + Borland BDE + Windows95.
ODBC behaves very strangely for bytea:
create table MyTable (c1 integer,c2 bytea);
--Then fill up value2 with blob value using Borland Delphi.
INSERT INTO MyTable VALUES(:value1,:value2)
The inserted row is really odd - c2 contains the OID pointing to the blob data. Though I don't know where the blob data actually reside, lo_export command does export the blob data to Linux file system. The even more serious problem I cannot circumvent is that I don't know how to retrieve that blob data from PostgreSQl through psqlODBC. This is because psqlODBC seems to not be able to return blob field type for BDE.
Thus, I am trying to use TEXT column instead - and fail, too:
create table MyTable (c1 integer,c2 text);
--Then fill up value2 with string value using Delphi.
INSERT INTO MyTable VALUES(:value1,:value2)
The INSERT results in Access Violation from IODBC32.DLL.
Please note that value2 is about 55 kbytes in size and contains some low values, '\0' in terms of C. Can this be the problem confusing pgsqlODBC?
I am in dilemma. Please help!
CN
--
_______________________________________________
Get your free email from http://www.graffiti.net
Powered by Outblaze
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: IODBC32.DLL: Access Violation
@ 2002-09-25 00:31 Hiroshi Inoue <Inoue@tpf.co.jp>
parent: CN LIOU <cnliou@graffiti.net>
0 siblings, 0 replies; 6+ messages in thread
From: Hiroshi Inoue @ 2002-09-25 00:31 UTC (permalink / raw)
To: CN LIOU <cnliou@graffiti.net>; +Cc: pgsql-odbc
CN LIOU wrote:
>
> Hi!
>
> psqlODBC 7.02.0002 + PostgreSql 7.2.1 + Borland BDE + Windows95.
>
> ODBC behaves very strangely for bytea:
>
> create table MyTable (c1 integer,c2 bytea);
> --Then fill up value2 with blob value using Borland Delphi.
> INSERT INTO MyTable VALUES(:value1,:value2)
Are you binding the :value2 as LongVarBinary ?
> The inserted row is really odd - c2 contains the OID pointing to
> the blob data. Though I don't know where the blob data actually
> reside, lo_export command does export the blob data to Linux file
> system. The even more serious problem I cannot circumvent is that
> I don't know how to retrieve that blob data from PostgreSQl through
> psqlODBC. This is because psqlODBC seems to not be able to return
> blob field type for BDE.
>
> Thus, I am trying to use TEXT column instead - and fail, too:
>
> create table MyTable (c1 integer,c2 text);
> --Then fill up value2 with string value using Delphi.
> INSERT INTO MyTable VALUES(:value1,:value2)
>
> The INSERT results in Access Violation from IODBC32.DLL.
> Please note that value2 is about 55 kbytes in size and contains
> some low values, '\0' in terms of C. Can this be the problem
> confusing pgsqlODBC?
Yes.
regards,
Hiroshi Inoue
http://w2422.nsk.ne.jp/~inoue/
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: IODBC32.DLL: Access Violation
@ 2002-09-25 07:09 CN LIOU <cnliou@graffiti.net>
0 siblings, 0 replies; 6+ messages in thread
From: CN LIOU @ 2002-09-25 07:09 UTC (permalink / raw)
To: pgsql-odbc
> > psqlODBC 7.02.0002 + PostgreSql 7.2.1 + Borland BDE + Windows95.
> >
> > ODBC behaves very strangely for bytea:
> >
> > create table MyTable (c1 integer,c2 bytea);
> > --Then fill up value2 with blob value using Borland Delphi.
> > INSERT INTO MyTable VALUES(:value1,:value2)
>
> Are you binding the :value2 as LongVarBinary ?
The answer is "No" if you refer LongVarBinary to Delphi's field type. I want to associate :value2 with Delphi's TBlobField.
If you refer LongVarBinary to the switches in pgsqlODBC, I have just tried switching on/off "Unknowns As LongVarChar" and "Maximum/Longest" in "Unknown sizes" box. They all give me the same result that follows.
> > The inserted row is really odd - c2 contains the OID pointing to
> > the blob data. Though I don't know where the blob data actually
> > reside, lo_export command does export the blob data to Linux file
> > system. The even more serious problem I cannot circumvent is that
> > I don't know how to retrieve that blob data from PostgreSQl through
> > psqlODBC. This is because psqlODBC seems to not be able to return
> > blob field type for BDE.
Best Regards,
CN
--
_______________________________________________
Get your free email from http://www.graffiti.net
Powered by Outblaze
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: IODBC32.DLL: Access Violation
@ 2002-09-25 12:52 CN LIOU <cnliou@graffiti.net>
0 siblings, 1 reply; 6+ messages in thread
From: CN LIOU @ 2002-09-25 12:52 UTC (permalink / raw)
To: pgsql-odbc
Thank you very much! Hiroshi,
> > psqlODBC 7.02.0002 + PostgreSql 7.2.1 + Borland BDE +Windows95.
[snip]
> >
> > Thus, I am trying to use TEXT column instead - and fail, too:
> >
> > create table MyTable (c1 integer,c2 text);
> > --Then fill up value2 with string value using Delphi.
> > INSERT INTO MyTable VALUES(:value1,:value2)
> >
> > The INSERT results in Access Violation from IDODBC32.DLL.
> > Please note that value2 is about 55 kbytes in size and contains
> > some low values, '\0' in terms of C. Can this be the problem
> > confusing pgsqlODBC?
>
> Yes.
I have then also removed low values from the string but AV remains. I have set the pgsqlODBC switches according to the instructions in:
http://gborg.postgresql.org/project/psqlodbc/faq/faq.php?faq_id=61
Can '\r' or '\n' be a problem? What are the allowed/disallowed characters in LongVarChar (to be sent to postgreSQL TEXT data type column)?
CN
--
_______________________________________________
Get your free email from http://www.graffiti.net
Powered by Outblaze
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: IODBC32.DLL: Access Violation
@ 2002-09-26 00:13 Hiroshi Inoue <Inoue@tpf.co.jp>
parent: CN LIOU <cnliou@graffiti.net>
0 siblings, 0 replies; 6+ messages in thread
From: Hiroshi Inoue @ 2002-09-26 00:13 UTC (permalink / raw)
To: CN LIOU <cnliou@graffiti.net>; +Cc: pgsql-odbc
CN LIOU wrote:
>
> Thank you very much! Hiroshi,
>
> > > psqlODBC 7.02.0002 + PostgreSql 7.2.1 + Borland BDE +Windows95.
>
> [snip]
>
> > >
> > > Thus, I am trying to use TEXT column instead - and fail, too:
> > >
> > > create table MyTable (c1 integer,c2 text);
> > > --Then fill up value2 with string value using Delphi.
> > > INSERT INTO MyTable VALUES(:value1,:value2)
> > >
> > > The INSERT results in Access Violation from IDODBC32.DLL.
> > > Please note that value2 is about 55 kbytes in size and contains
> > > some low values, '\0' in terms of C. Can this be the problem
> > > confusing pgsqlODBC?
> >
> > Yes.
>
> I have then also removed low values from the string but AV remains. I have set the pgsqlODBC switches according to the instructions in:
>
> http://gborg.postgresql.org/project/psqlodbc/faq/faq.php?faq_id=61
>
> Can '\r' or '\n' be a problem?
Maybe. Please turn off *LF <-> CR/LF conversion* DSN
option setting.
> What are the allowed/disallowed characters in LongVarChar
> (to be sent to postgreSQL TEXT data type column)?
AFAIK there's no inhibited character other than '\0'.
However there may be another problem. If you are in a
multibyte environment the client encoding would be
converted to the server's one.
regards,
Hiroshi Inoue
http://w2422.nsk.ne.jp/~inoue/
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: IODBC32.DLL: Access Violation
@ 2002-09-26 08:54 CN LIOU <cnliou@graffiti.net>
0 siblings, 0 replies; 6+ messages in thread
From: CN LIOU @ 2002-09-26 08:54 UTC (permalink / raw)
To: pgsql-odbc
Many thanks! Hiroshi,
> > > > psqlODBC 7.02.0002 + PostgreSql 7.2.1 + Borland BDE +Windows95.
> >
> > [snip]
> >
> > > >
> > > > Thus, I am trying to use TEXT column instead - and fail, too:
> > > >
> > > > create table MyTable (c1 integer,c2 text);
> > > > --Then fill up value2 with string value using Delphi.
> > > > INSERT INTO MyTable VALUES(:value1,:value2)
> > > >
> > > > The INSERT results in Access Violation from IDODBC32.DLL.
> > > > Please note that value2 is about 55 kbytes in size and contains
> > > > some low values, '\0' in terms of C. Can this be the problem
> > > > confusing pgsqlODBC?
> > >
> > > Yes.
> >
> > I have then also removed low values from the string but AV remains. I have set the pgsqlODBC switches according to the instructions in:
> >
> > http://gborg.postgresql.org/project/psqlodbc/faq/faq.php?faq_id=61
> >
> > Can '\r' or '\n' be a problem?
>
> Maybe. Please turn off *LF <-> CR/LF conversion* DSN
> option setting.
>
> > What are the allowed/disallowed characters in LongVarChar
> > (to be sent to postgreSQL TEXT data type column)?
>
> AFAIK there's no inhibited character other than '\0'.
> However there may be another problem. If you are in a
> multibyte environment the client encoding would be
> converted to the server's one.
Now I found that the problem has nothing to do with the data itself in the string to be inserted. It is the _size_ of the string which causes IDODBC32.DLL Access Violation. The insert is OK for several bytes, but data with 55 kbytes causes ODBC AV. Any idea?
Regards, CNLIOU
--
_______________________________________________
Get your free email from http://www.graffiti.net
Powered by Outblaze
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2002-09-26 08:54 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-09-24 02:06 IODBC32.DLL: Access Violation CN LIOU <cnliou@graffiti.net>
2002-09-25 00:31 ` Hiroshi Inoue <Inoue@tpf.co.jp>
2002-09-25 07:09 Re: IODBC32.DLL: Access Violation CN LIOU <cnliou@graffiti.net>
2002-09-25 12:52 Re: IODBC32.DLL: Access Violation CN LIOU <cnliou@graffiti.net>
2002-09-26 00:13 ` Hiroshi Inoue <Inoue@tpf.co.jp>
2002-09-26 08:54 Re: IODBC32.DLL: Access Violation CN LIOU <cnliou@graffiti.net>
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