Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-odbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group