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

From: "Erika Marlow" <Erika(dot)Marlow(at)nisc(dot)coop>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: error message "column "oid" doesn't exist"
Date: 2007-01-05 18:05:56
Message-ID: 8388742B98C6BE479282C543CD000EE003C900FA@ndes1.nisc.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

The method is updating tables from another source, and filtering the dataset to determine whether or not the record already exists. It's been adapted from code that was just hitting an MS Access DB, and based on the responses I've been getting I'll probably have to go in and modify the method to use SQL update statements or batch updating instead of the ADO Recordset.Update() method.

Your mention of client side recordsets, reminded me of issues with the ODBC driver and "dynamic" updating in other places. I was able to get around that by converting to client side recordsets and batch updating.

Thanks to everyone who's offered information.
Erika

________________________________

From: greg(dot)campbell(at)us(dot)michelin(dot)com [mailto:greg(dot)campbell(at)us(dot)michelin(dot)com]
Sent: Friday, January 05, 2007 11:11 AM
To: pgsql-odbc(at)postgresql(dot)org; Erika Marlow
Subject: Re: [ODBC] error message "column "oid" doesn't exist"

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,

<http://www.nisc.coop/> 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 <mailto:erika(dot)marlow(at)nisc(dot)coop>
* Phone: 866.WWW.NISC (866.999.6472)
* Direct: 636.755.2519

Browse pgsql-odbc by date

  From Date Subject
Next Message Terry Lorber 2007-01-05 19:29:59 PsqlODBC with a SSL connection
Previous Message greg.campbell 2007-01-05 17:11:22 Re: error message "column "oid" doesn't exist"