INSERT malfunction between MS-Access - PostgreSQL - LO

From: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
To: pgsql-odbc <pgsql-odbc(at)postgresql(dot)org>
Subject: INSERT malfunction between MS-Access - PostgreSQL - LO
Date: 2009-10-23 15:51:40
Message-ID: 396486430910230851k3dc931c6y72216e152e7e3691@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Can anyone help me identify the source of following misbehavior and correct it?

I'm test how MS-Access handles large objects (LO) when using linked
tables that are mapped to the OLE Object datatype.

When I insert a new record, the record always returns with a #Deleted.
When I close the form and refresh, the record displays.

I checked the PostgreSQL logs generated after an insert to see why I
getting #Deleted. Here is what I saw:

2009-10-23 08:31:06 PDTLOG: statement: BEGIN
2009-10-23 08:31:06 PDTLOG: fastpath function call: "lo_creat" (OID 957)
2009-10-23 08:31:06 PDTLOG: fastpath function call: "lo_open" (OID 952)
2009-10-23 08:31:06 PDTLOG: fastpath function call: "lo_lseek" (OID 956)
2009-10-23 08:31:06 PDTLOG: fastpath function call: "lowrite" (OID 955)
2009-10-23 08:31:06 PDTLOG: fastpath function call: "lowrite" (OID 955)

... [ then hundreds repeats of the previous log]

2009-10-23 08:31:09 PDTLOG: fastpath function call: "lowrite" (OID 955)
2009-10-23 08:31:09 PDTLOG: fastpath function call: "lo_close" (OID 953)
2009-10-23 08:31:09 PDTLOG: statement: INSERT INTO
"public"."testtable" ("object") VALUES ('48509'::lo)
2009-10-23 08:31:09 PDTLOG: statement: SELECT "id","object","xmin"
FROM "public"."testtable" WHERE "id" IS NULL
2009-10-23 08:31:09 PDTLOG: statement: COMMIT
2009-10-23 08:31:09 PDTLOG: statement: SELECT "id","object","xmin"
FROM "public"."testtable" WHERE "id" IS NULL

For some reason, a record is being selected with id IS NULL, rather
than selecting the next id. Is there anyway to correct this behavior?

--
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

Browse pgsql-odbc by date

  From Date Subject
Next Message Nim Li 2009-11-02 20:59:31 Question about saving user name and password
Previous Message Hiroshi Inoue 2009-10-19 04:01:06 Re: Postgres inserts null value for parameterized statement