Обсуждение: OIDS column required with ODBC ?

Поиск
Список
Период
Сортировка

OIDS column required with ODBC ?

От
Secrétariat
Дата:

Hello !
 
I want to open a recordset using ODBC (07_03_0200) in MS-VB6 (SP6) on a PG table (7.4.3) created WITHOUT OIDS.
I receive an error message  : 'Colum ?id? doesn't exist !' the method Open ?
 
Would pgsqlODBC require an OIDS column on all the tables ?
I don't find setting for that in the ODBC driver...
 
Luc

Re: OIDS column required with ODBC ?

От
Secrétariat
Дата:
I use the Open Method from ADO in MS Visual-Basic 6.0 ...
Is there anybody who can explain to me why I can't open tables without OIDS
?

 Thanks.

 Luc

> ----- Original Message -----
> From: "Philippe Lang" <philippe.lang@attiksystem.ch>
> To: "Luc ROLLAND" <luc@rolland-fr.com>; "ODBC PostgreSQL"
> <pgsql-odbc@postgresql.org>
> Sent: Tuesday, September 21, 2004 11:57 AM
> Subject: Re: [ODBC] OIDS column required with ODBC ?
>
>
> Hello,
>
> No, you don't need to use OIDs with the ODBC driver. I alway create tables
> WITHOUT OIDS, and I can access them through ODBC with MS Access without
> any problem.
>
> But I'm sorry I cannot tell you the reason of your error message...
>
> Hope it will help you anyway.
>
> Philippe
>
> ________________________________
>
> De : pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] De la part de Luc ROLLAND
> Envoyé : mardi, 21. septembre 2004 11:48
> À : ODBC PostgreSQL
> Objet : [ODBC] OIDS column required with ODBC ?
>
>
>
> Hello !
>
> I want to open a recordset using ODBC (07_03_0200) in MS-VB6 (SP6) on a PG
> table (7.4.3) created WITHOUT OIDS.
> I receive an error message  : 'Colum ?id? doesn't exist !' when I use the
> method Open ?
> The same code works if the table has an OID column.
>
> Would pgsqlODBC require an OIDS column on all the tables ?
> I don't find setting for that in the ODBC driver...
>
> Luc
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>


Re: OIDS column required with ODBC ?

От
Shachar Shemesh
Дата:
Secrétariat wrote:

> I use the Open Method from ADO in MS Visual-Basic 6.0 ...
> Is there anybody who can explain to me why I can't open tables without
> OIDS ?
>
> Thanks.
>
> Luc

The ODBC driver is emulating updateable cursors by adding the xid and
oid to each query. It can then identify each row in the result, and
update it if requested. When you open a table that doesn't have oid,
this open fails.

To work around this problem, you need to open your rows in a
non-updateable mode, which will make ODBC not add the requirement for
oid in the table, and solve the problem.

                Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting ltd.
http://www.lingnu.com/