Re: Cannot update PGSQL databes via ODBC

From: Steve Holmes <sholmes(at)primenet(dot)com>
To: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
Cc: "'pgsql-interfaces(at)postgresql(dot)org'" <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: Cannot update PGSQL databes via ODBC
Date: 2000-05-11 11:40:33
Message-ID: 8t6lhs45o3d2mo1retavb5v68485jo1s0m@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)vale-housing(dot)co(dot)uk> wrote:

>
>
>> -----Original Message-----
>> From: Steve Holmes [mailto:sholmes(at)primenet(dot)com]
>> Sent: 11 May 2000 05:14
>> To: pgsql-interfaces(at)postgresql(dot)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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Anders Bengtsson 2000-05-15 13:43:38 Re: Missing features in JDBC driver
Previous Message Dave Page 2000-05-11 08:27:11 RE: Cannot update PGSQL databes via ODBC