From: Steve Holmes <sholmes@primenet.com>
To: Dave Page <dpage@vale-housing.co.uk>
Cc: 'pgsql-interfaces@postgresql.org' <pgsql-interfaces@postgresql.org>
Subject: Re: Cannot update PGSQL databes via ODBC
Date: Thu, 11 May 2000 04:40:33 -0700
Message-ID: <8t6lhs45o3d2mo1retavb5v68485jo1s0m@4ax.com> (raw)
In-Reply-To: <8568FC767B4AD311AC33006097BCD3D6091781@woody.vale-housing.co.uk>
References: <8568FC767B4AD311AC33006097BCD3D6091781@woody.vale-housing.co.uk>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-interfaces@postgresql.org
Cc: sholmes@primenet.com, dpage@vale-housing.co.uk
Subject: Re: Cannot update PGSQL databes via ODBC
In-Reply-To: <8t6lhs45o3d2mo1retavb5v68485jo1s0m@4ax.com>
References: <8568FC767B4AD311AC33006097BCD3D6091781@woody.vale-housing.co.uk> <8t6lhs45o3d2mo1retavb5v68485jo1s0m@4ax.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox