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,
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.oberle@winntec.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".
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.marlow@nisc.coop ( Phone: 866.WWW.NISC (866.999.6472) ( Direct: 636.755.2519