Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id AA0C4476331 for ; Tue, 24 Sep 2002 20:30:30 -0400 (EDT) Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id EE4CF4761EB for ; Tue, 24 Sep 2002 20:30:28 -0400 (EDT) Received: (qmail 13069 invoked from network); 25 Sep 2002 00:30:31 -0000 Received: from unknown (HELO viscomail.tpf.co.jp) (100.0.0.108) by sd2.tpf-fw-c.co.jp with SMTP; 25 Sep 2002 00:30:31 -0000 Received: from tpf.co.jp (3dgateway1 [126.0.1.60]) by viscomail.tpf.co.jp (8.8.8+Sun/8.8.8) with ESMTP id JAA13882; Wed, 25 Sep 2002 09:30:31 +0900 (JST) Message-ID: <3D9103CD.FC657C1B@tpf.co.jp> Date: Wed, 25 Sep 2002 09:31:09 +0900 From: Hiroshi Inoue X-Mailer: Mozilla 4.73 [ja] (Windows NT 5.0; U) X-Accept-Language: ja MIME-Version: 1.0 To: CN LIOU Cc: pgsql-odbc@postgresql.org Subject: Re: IODBC32.DLL: Access Violation References: <20020924020651.23860.qmail@graffiti.net> Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/88 X-Sequence-Number: 2059 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/