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

From Steve Holmes
Subject Re: Cannot update PGSQL databes via ODBC
Date
Msg-id 8t6lhs45o3d2mo1retavb5v68485jo1s0m@4ax.com
Whole thread Raw
In response to RE: Cannot update PGSQL databes via ODBC  (Dave Page <dpage@vale-housing.co.uk>)
List pgsql-interfaces
Thank you all so much for the replies.  Guess my previous attempts
didn't make it to the list as I was just signing up.  

I am guilty of all the above:) I had no primary keys or index built
yet and I used a ";" on my query strings from VB.  So to start with, I
will probably try the options outlined below and later get more proper
and build an index for this main table.

Thanks again for the help.

On Thu, 11 May 2000 08:27:11 -0000, Dave Page
<dpage@vale-housing.co.uk> wrote:

> 
>
>> -----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. 
>  

--
<Steve> Holmes
Tempe, Arizona  USA


pgsql-interfaces by date:

Previous
From: Michael Meskes
Date:
Subject: Re: ECPG failed and Postmaster getting bigger in using perl Pg
Next
From: Joseph Shraibman
Date:
Subject: Re: jdbc 7.0 fix for off by one errors.