RE: Cannot update PGSQL databes via ODBC

Поиск
Список
Период
Сортировка
От Dave Page
Тема RE: Cannot update PGSQL databes via ODBC
Дата
Msg-id 8568FC767B4AD311AC33006097BCD3D6091781@woody.vale-housing.co.uk
обсуждение исходный текст
Ответ на Cannot update PGSQL databes via ODBC  (Steve Holmes <sholmes@primenet.com>)
Ответы Re: Cannot update PGSQL databes via ODBC
Список 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 по дате отправления:

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: Cannot update PGSQL databes via ODBC
Следующее
От: Michael Meskes
Дата:
Сообщение: Re: ECPG failed and Postmaster getting bigger in using perl Pg