Re: error message "column "oid" doesn't exist"

From: greg(dot)campbell(at)us(dot)michelin(dot)com
To: pgsql-odbc(at)postgresql(dot)org, "Erika Marlow" <Erika(dot)Marlow(at)nisc(dot)coop>
Subject: Re: error message "column "oid" doesn't exist"
Date: 2007-01-05 17:11:22
Message-ID: OFFBB5B9E8.880C7296-ON8525725A.005D5DC2-8525725A.005E6CB0@michelin.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

You say the problem is happening when you are using VB with ADO and you
say that is happening at SELECT statements.

SELECT statements can generally be read only and so do not need to
uniquely identify records. Uniquely identifying records and determining
whether or not they have been updated by someone else comes into play for
data manipulation statements. This means update DML statements use Primary
Keys, OIDs, and possibly virtually unique keys (WHERE field1='old_value1'
and field2='old_value2'). You could see a lot of these syntax if logging
is turned on.

I digress.
Do you have a client side cursor and a read only statement? eg.

sql = "SELECT * FROM some_table"
set rs = new ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open sql, myConn, adOpenStatic, adLockReadOnly, adCmdText

The MSDN has all the docs on making ADO behave properly as a disconnected
recordset,

Greg Campbell ENG-ASE/Michelin US5
Lexington, South Carolina
803-951-5561, x75561
Fax: 803-951-5531
greg(dot)campbell(at)us(dot)michelin(dot)com

"Erika Marlow" <Erika(dot)Marlow(at)nisc(dot)coop>
Sent by: pgsql-odbc-owner(at)postgresql(dot)org
01/05/2007 10:05

To
<pgsql-odbc(at)postgresql(dot)org>
cc

Subject
Re: [ODBC] error message "column "oid" doesn't exist"

Hmm. Well, I am opening the tables for editing. All of the tables have
unique primary keys that can be referenced. Is there a flag or something I
can set to prevent it from looking for oid?

Thanks,
Erika

From: Oberle, Martin [mailto:martin(dot)oberle(at)winntec(dot)de]
Sent: Wednesday, January 03, 2007 1:36 PM
To: Erika Marlow
Subject: AW: [ODBC] error message "column "oid" doesn't exist"

As far as I know the odbc driver uses the oid to identify the records when
updating records.
The driver adds the column oid to the query when the driver thinks that
records mjight be updated
in the future. The error should not occure whe you open the table
"readonly".

good luck

martin

-----Ursprüngliche Nachricht-----
Von: pgsql-odbc-owner(at)postgresql(dot)org
[mailto:pgsql-odbc-owner(at)postgresql(dot)org]Im Auftrag von Erika Marlow
Gesendet: Dienstag, 2. Januar 2007 19:00
An: pgsql-odbc(at)postgresql(dot)org
Betreff: Re: [ODBC] error message "column "oid" doesn't exist"

We are recieving the error message "column "oid" doesn't exist" from a
series of ODBC calls via ADO in a Visual Basic application. The SQL
statements are all "SELECT * FROM <table>" where <table> refers to several
different tables. No tables were created with OIDs, because we don't use
them. So, the statement in the error is true, but we've been using the
same application without issues for quite some time.

We're still using the 8.01.0200 drivers, UNICODE in this particular case,
and if necessary can upgrade (but it's a painful process).

Any suggestions for resolving the issue without updating to the latest
drivers?

If updating is the only option, do the new installation packages for the
driver take care of any ANSI/UNICODE differences? What are the rules for
moving from one to the other?

Thanks,

Erika Marlow___________________
Senior Software Specialist
National Information Solutions Cooperative
One Innovation Circle
Lake St. Louis, MO 63367
+ Email: erika(dot)marlow(at)nisc(dot)coop
( Phone: 866.WWW.NISC (866.999.6472)
( Direct: 636.755.2519

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Erika Marlow 2007-01-05 18:05:56 Re: error message "column "oid" doesn't exist"
Previous Message Erika Marlow 2007-01-05 15:05:02 Re: error message "column "oid" doesn't exist"