Re: Need help with Visual Basic 6 and PostgreSQL

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Finn Lassen <dcio(at)AxiomInt(dot)com>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Need help with Visual Basic 6 and PostgreSQL
Date: 2007-11-24 00:27:03
Message-ID: 984765.79625.qm@web31801.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

--- On Fri, 11/23/07, Finn Lassen <dcio(at)AxiomInt(dot)com> wrote:
> "ERROR: Column "oid" does not exist;"
> I get when executing the " rsOut.Open ..."
> statement below.

Here are some OID setting from ODBC driver manual:
...
OID Options:

Show Column: Includes the OID in SQLColumns. This is good for using as a unique identifier to update records if no good key exists OR if the key has many parts, which blows up the backend.

Fake Index: This option fakes a unique index on OID. This is useful when there is not a real unique index on OID and for apps which can't ask what the unique identifier should be (i.e, Access 2.0).
...

Perhaps the odbc driver defaults to showing ODBC column. In postgresql versions < 8.0 it was the default for every table to be given an OID (basically every row in any and all tables had a unique number that identified it). However, as of postgresql 8.0, OID columns are no longer added to all table by default. This could be causing the problem since the ODBC driver may be trying to select the OID column from your table even though it doesn't actually exist.

I will look for the ODBC documention that describes that settings that you can pass to the ODBC driver in the connection string.

Regards,
Richard Broersma Jr.

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Richard Broersma Jr 2007-11-24 00:30:18 Re: odbc varchar/longvarchar default setting
Previous Message Thomas H. 2007-11-24 00:08:50 Re: Need help with Visual Basic 6 and PostgreSQL