RE: Cannot update PGSQL databes via ODBC - Mailing list pgsql-interfaces

From Dave Page
Subject RE: Cannot update PGSQL databes via ODBC
Date
Msg-id 8568FC767B4AD311AC33006097BCD3D6091781@woody.vale-housing.co.uk
Whole thread Raw
In response to Cannot update PGSQL databes via ODBC  (Steve Holmes <sholmes@primenet.com>)
Responses Re: Cannot update PGSQL databes via ODBC
List pgsql-interfaces
 

> -----Original Message-----
> From: Steve Holmes [mailto:sholmes@primenet.com]
> Sent: 11 May 2000 05:14
> To: pgsql-interfaces@postgresql.org
> Subject: [INTERFACES] Cannot update PGSQL databes via ODBC
> 
> 
> When using the latest version of PSQLODBC to connect to a linux
> machine running postgresql 6.5.2, I keep getting read-only mode.  I
> have the privs wide open on the linux side and I even turned off the
> read-only flag in the DSN's advanced driver settings.  When using VB6
> to attempt updating a table, I get the error telling me that update is
> not allowed and that select is the only allowed operations.  BTW, I
> can do a select with it and that part works fine.

In the Datasource options of the ODBC driver, try setting Show Column and
Fake Index under OID Options to 'checked'. This will make VB think that
there is a unique index on every table (the OID is always unique so it's not
far wrong!). 

Another 'gotcha' with ADO is that the inclusion of a semi-colon at the end
of a query (as you would use in psql) will make any resultant recordset
read-only eg. (rs = ADO Recordset object, cn = ADO Connection object)

rs.Open "SELECT * FROM pg_class;", cn

will create a read-only recordset whereas:

rs.Open "SELECT * FROM pg_class", cn

won't. Hope this helps.

Regards,  
Dave.  
-- 
NASA uses Windows? Oh great. If Apollo 13 went off course today
the manual would just tell them to open the airlock, flush the astronauts
out, and re-install new ones! - Kibo in the SDM.
http://www.vale-housing.co.uk/ - http://www.pgadmin.freeserve.co.uk/


pgsql-interfaces by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: Cannot update PGSQL databes via ODBC
Next
From: Michael Meskes
Date:
Subject: Re: ECPG failed and Postmaster getting bigger in using perl Pg