Received: from sholmes.phx.primenet.com (root@sholmes.phx.primenet.com [204.245.17.238]) by hub.org (8.9.3/8.9.3) with ESMTP id HAA12367 for ; Thu, 11 May 2000 07:40:28 -0400 (EDT) (envelope-from sholmes@primenet.com) Received: from STEVE ([192.168.1.2]) by sholmes.phx.primenet.com (8.9.3/8.9.3) with SMTP id EAA19036; Thu, 11 May 2000 04:40:23 -0700 From: Steve Holmes To: Dave Page Cc: "'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> References: <8568FC767B4AD311AC33006097BCD3D6091781@woody.vale-housing.co.uk> In-Reply-To: <8568FC767B4AD311AC33006097BCD3D6091781@woody.vale-housing.co.uk> X-Mailer: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id HAA12466 X-Archive-Number: 200005/93 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 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. > -- Holmes Tempe, Arizona USA