ODBC and Large Objects, FAQ not working

From: "Christian Hang" <christian(dot)hang(at)gmx(dot)de>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: ODBC and Large Objects, FAQ not working
Date: 1999-12-07 21:53:58
Message-ID: 199912072157.WAA21139@kawoserv.kawo2.rwth-aachen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hi,

I know you've read this all before, as I went through most postings concerning this issue. But I
haven't found a reply that helped me, so I hope I'll get one this way.

I want to hook up Microsoft Access (2000) via ODBC (6.400007) to my PostgreSQL server
(6.5.3, Linux 2.2.10). Everything works fine, but I am having trouble inserting OLE objects into
my database.

I created the "lo" type suggested in the ODBC FAQ and a basic table (CREATE TABLE ole (id
int4, bild lo);) for testing purposes. But when I insert an OLE object, I get the error message
"Couldnt open large object for writing (ERROR #1)".
I attached the corresponding log.

I'd appreciate your help in this matter, as I tried any advice given in earlier postings concerning
problems like this, but nothing would help.

Chris

----

Error log:

conn=144654652, query='BEGIN'
conn=144654652, query='INSERT INTO "ole" ("id") VALUES (1)'
conn=144654652, query='COMMIT'
conn=144654652, query='SELECT "oid","id","bild" FROM "ole" WHERE "oid" IS NULL'
[ fetched 0 rows ]
conn=144654652, query='SELECT "ole"."oid" FROM "ole" WHERE
"id" = 1'
[ fetched 1 rows ]
conn=144654652, query='SELECT "oid","id","bild" FROM "ole"
WHERE "oid" = 19718'
[ fetched 1 rows ]
conn=144654652, query='SELECT "oid","id","bild" FROM "ole" WHERE "oid" = 19718'
[ fetched 1 rows ]
conn=144654652, query='SELECT "oid","id","bild" FROM "ole" WHERE "oid" = 19718'
[ fetched 1 rows ]
ERROR from backend during send_function: 'ERROR: lo_lseek: invalid large obj descriptor (0)
'
STATEMENT ERROR: func=SQLPutData, desc='', errnum=1, errmsg='Couldnt open large object
for writing.'
------------------------------------------------------------
hdbc=144654652, stmt=144669180, result=0
manual_result=0, prepare=0, internal=0
bindings=0, bindings_allocated=0
parameters=145688992, parameters_allocated=1
statement_type=1, statement='INSERT INTO "ole" ("bild") VALUES (?)'
stmt_with_params='INSERT INTO "ole" ("id") VALUES (1)'
data_at_exec=0, current_exec_param=0, put_data=1
currTuple=-1, current_col=-1, lobj_fd=-1
maxRows=0, rowset_size=1, keyset_size=0, cursor_type=0, scroll_concurrency=1
cursor_name='SQL_CUR089F79FC'
----------------QResult Info -------------------------------
CONN ERROR: func=SQLPutData, desc='', errnum=0, errmsg='ERROR: lo_lseek: invalid large
obj descriptor (0)
'
------------------------------------------------------------
henv=145686660, conn=144654652, status=1, num_stmts=16
sock=145688632, stmts=145688672, lobj_type=19268
---------------- Socket Info -------------------------------
socket=308, reverse=0, errornumber=0, errormsg='(null)'
buffer_in=144660980, buffer_out=144665080
buffer_filled_in=53, buffer_filled_out=0, buffer_read_in=53
ERROR from backend during send_function: 'ERROR: lo_lseek: invalid large obj descriptor (0)
'
STATEMENT ERROR: func=SQLPutData, desc='', errnum=1, errmsg='Couldnt open large object
for writing.'
------------------------------------------------------------
hdbc=144654652, stmt=144669180, result=0
manual_result=0, prepare=0, internal=0
bindings=0, bindings_allocated=0
parameters=145688992, parameters_allocated=1
statement_type=1, statement='INSERT INTO "ole" ("bild") VALUES (?)'
stmt_with_params='INSERT INTO "ole" ("id") VALUES (1)'
data_at_exec=0, current_exec_param=0, put_data=1
currTuple=-1, current_col=-1, lobj_fd=-1
maxRows=0, rowset_size=1, keyset_size=0, cursor_type=0, scroll_concurrency=1
cursor_name='SQL_CUR089F79FC'
----------------QResult Info -------------------------------
CONN ERROR: func=SQLPutData, desc='', errnum=0, errmsg='ERROR: lo_lseek: invalid large
obj descriptor (0)
'
------------------------------------------------------------
henv=145686660, conn=144654652, status=1, num_stmts=16
sock=145688632, stmts=145688672, lobj_type=19268
---------------- Socket Info -------------------------------
socket=308, reverse=0, errornumber=0, errormsg='(null)'
buffer_in=144660980, buffer_out=144665080
buffer_filled_in=53, buffer_filled_out=0, buffer_read_in=53
conn=144654652, SQLDisconnect

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Brian Haney 1999-12-08 00:58:44 VBA Recordset.AddNew and NOT NULL fields
Previous Message Gary Stainburn 1999-12-07 19:36:41 RE: [INTERFACES] locking on database updates