Postgres ODBC driver and ms access ole field porblem - Mailing list pgsql-interfaces

From Robert Ewald
Subject Postgres ODBC driver and ms access ole field porblem
Date
Msg-id 004f01c13ae4$7a919400$01b4188d@Ewaldia
Whole thread Raw
List pgsql-interfaces
 
Hi,

I have following problem with the ODBC driver or is it the server? I =
have an
MS Access Database which I want to put into a postgres database to have =
MS
Access to be only the frontend. That worked fine until I came across an =
OLE
field.
So I created an lo type in my postgres database as it is described in =
the
postodbc faq.
Now, when I want to access the lo type field in my postgres database =
>from ms
access then I get an error:

"Socket has been closed"

the postmaster log returns something like this:

indExec: found "/usr/lib/pgsql/bin/postgres" using argv[0]
/usr/lib/pgsql/bin/postmaster: BackendStartup: pid 16319 user postgres =
db
test socket 5
FindExec: found "/usr/lib/pgsql/bin/postgres" using argv[0]
started: host=3D192.168.1.2 user=3Dpostgres database=3Dtest
InitPostgres
StartTransactionCommand
ProcessUtility
CommitTransactionCommand
.
.
.
StartTransactionCommand
CommitTransactionCommand
TRAP: Bad Argument to Function call("!(AllocSetContains(set,pointer)):",
File: "aset.c", Line: 214)
!(AllocSetContains(set, pointer)) (0)
/usr/lib/pgsql/bin/postmaster: reaping dead processes...
/usr/lib/pgsql/bin/postmaster: CleanupProc: pid 16319 exited with status =
6
/usr/lib/pgsql/bin/postmaster: CleanupProc: reinitializing shared memory =
and
semaphores
shmem_exit(0) [#0]
pmdie 15
proc_exit(0) [#0]
shmem_exit(0) [#0]
exit(0)

and the odbc driver log returns this:

conn=3D79233144,
QLDriverConnect( =
in)=3D'DSN=3DPostgreSQL;UID=3Dpostgres;PWD=3Dp;DATABASE=3Dtest;SERVER
=3Dartus;PORT=3D5432;READONLY=3D0;PROTOCOL=3D6.4;FAKEOIDINDEX=3D0;SHOWOID=
COLUMN=3D0;ROWV
ERSIONING=3D0;SHOWSYSTEMTABLES=3D0;CONNSETTINGS=3D;', =
fDriverCompletion=3D0
DSN info:
DSN=3D'PostgreSQL',server=3D'artus',port=3D'5432',dbase=3D'test',user=3D'=
postgres',pas
swd=3D'p'

readonly=3D'0',protocol=3D'6.4',showoid=3D'0',fakeoidindex=3D'0',showsyst=
able=3D'0'
          conn_settings=3D''
          translation_dll=3D'',translation_option=3D''
Global Options: Version=3D'06.40.0006', fetch=3D100, socket=3D4096,
unknown_sizes=3D0, max_varchar_size=3D254, max_longvarchar_size=3D4094
                disable_optimizer=3D0, ksqo=3D1, unique_index=3D1,
use_declarefetch=3D0
                text_as_longvarchar=3D1, unknowns_as_longvarchar=3D0,
bools_as_char=3D0
                extra_systable_prefixes=3D'dd_;', conn_settings=3D''
conn=3D79233144, query=3D' '
conn=3D79233144, query=3D'set DateStyle to 'ISO''
conn=3D79233144, query=3D'set ksqo to 'ON''
conn=3D79233144, query=3D'select oid from pg_type where typname=3D'lo''
    [ fetched 1 rows ]
    [ Large Object oid =3D 18464 ]
conn=3D79233144,
SQLDriverConnect(out)=3D'DSN=3DPostgreSQL;DATABASE=3Dtest;SERVER=3Dartus;=
PORT=3D5432;U
ID=3Dpostgres;PWD=3Dp;READONLY=3D0;PROTOCOL=3D6.4;FAKEOIDINDEX=3D0;SHOWOI=
DCOLUMN=3D0;ROW
VERSIONING=3D0;SHOWSYSTEMTABLES=3D0;CONNSETTINGS=3D'
conn=3D79233144, query=3D'SELECT "ole"."id" FROM "ole" '
    [ fetched 1 rows ]
conn=3D79233144, query=3D'SELECT "id","name",'#S_C_H#'  FROM "ole"  =
WHERE "id" =3D
1 OR "id" =3D 1 OR "id" =3D 1 OR "id" =3D 1 OR "id" =3D 1 OR "id" =3D 1 =
OR "id" =3D 1 OR
"id" =3D 1 OR "id" =3D 1 OR "id" =3D 1'
    [ fetched 1 rows ]
conn=3D79233144, query=3D'SELECT "object"  FROM "ole"  WHERE "id" =3D 1'
    [ fetched 1 rows ]
conn=3D79233144, query=3D'SELECT "object"  FROM "ole"  WHERE "id" =3D 1'
STATEMENT ERROR: func=3DSC_execute, desc=3D'', errnum=3D1, =
errmsg=3D'Error while
executing the query'
                 =
-----------------------------------------------------------
-
                 hdbc=3D79233144, stmt=3D79314784, result=3D0
                 manual_result=3D0, prepare=3D1, internal=3D0
                 bindings=3D79313916, bindings_allocated=3D1
                 parameters=3D79313632, parameters_allocated=3D1
                 statement_type=3D0, statement=3D'SELECT "object"  FROM =
"ole"
WHERE "id" =3D ?'
                 stmt_with_params=3D'SELECT "object"  FROM "ole"  WHERE =
"id" =3D
1'
                 data_at_exec=3D-1, current_exec_param=3D-1, =
put_data=3D0
                 currTuple=3D-1, current_col=3D-1, lobj_fd=3D-1
                 maxRows=3D0, rowset_size=3D1, keyset_size=3D0, =
cursor_type=3D0,
scroll_concurrency=3D1
                 cursor_name=3D'SQL_CUR04BA3F60'
                 ----------------QResult
Info -------------------------------
CONN ERROR: func=3DSC_execute, desc=3D'', errnum=3D104, errmsg=3D'Could =
not send
Query to backend'
            ------------------------------------------------------------
            henv=3D80285584, conn=3D79233144, status=3D1, num_stmts=3D16
            sock=3D80285600, stmts=3D80281732, lobj_type=3D18464
            ---------------- Socket Info -------------------------------
            socket=3D57, reverse=3D0, errornumber=3D10, =
errormsg=3D'Socket has been
closed.'
            buffer_in=3D79239472, buffer_out=3D79243572
            buffer_filled_in=3D0, buffer_filled_out=3D0, =
buffer_read_in=3D1


I am able to put one object into this field, but i cannot retrieve it. I
have to close ms access and to restart the postmaster then I can read =
this
object and the everything is down again.

how can i fix this?

thanks for your help

Robert


pgsql-interfaces by date:

Previous
From: "Robert Ewald"
Date:
Subject: PostgreSQL ODBC Driver and MS Access OLE field problem
Next
From: rodneyr@embratel.com.br
Date:
Subject: Embedded SQL in C