Re: DAO VB ODBC "read only problems - Mailing list pgsql-interfaces

From Miller, Sam
Subject Re: DAO VB ODBC "read only problems
Date
Msg-id 794826DE8867D411BAB8009027AE9EB9135B6EE9@FMSMSX38
Whole thread Raw
In response to DAO VB ODBC "read only problems  ("Miller, Sam" <sam.miller@intel.com>)
List pgsql-interfaces
Hiroshi and others,

I added:
wrkODBC.DefaultCursorDriver=dbUseODBCCursor
after the "Set wrkODBC....." line.

Still doesn't work.  Any more ideas?

I discovered I am using postgresql-7.0.2-17, could that be the problem?
(The ODBC driver is at 7.01.0007)

Getting desperate,

Sam

-----Original Message-----
From: Hiroshi Inoue [mailto:Inoue@tpf.co.jp]
Sent: Monday, October 29, 2001 4:40 PM
To: Miller, Sam
Cc: pgsql-interfaces@postgresql.org
Subject: Re: [INTERFACES] DAO VB ODBC "read only problems


"Miller, Sam" wrote:
> 
> Folks,
> 
> I am having great difficulty getting a VB script (Excel) to talk to a
linux
> based PostgreSQL server.  I can read data just fine but get the following
> error when I try to edit:
> 
> Next line produces error:
> Run-time error '3027';
> Connot update. Database or object is read-only
> 
> I have done the following so far:
> 
> 1. Created a table with a "PRIMARY KEY" as:
> CREATE TABLE data2 (
>  x integer,
>  y integer,
>  symbol varchar(15),
>  pin varchar(15) primary key);
> 
> 2. Made sure that the select statement does not end in a semi-colon.
> 
> 3. Created the following table (don't think this is necessary).. but I saw
> something that mentioned it:
> CREATE TABLE "msysconf" (
> "config" int2 NOT NULL,
> "chvalue" character varying,
> "nvalue" int4,
> "comments" character varying);
> 
> 4. Verified that the "read only" check box is not checked in the
PostgreSQL
> ODBC Advanced Options
> 
> 5. Checked both "show columns" and "fake index" in the OID options section
> of the Data Source advanced options.
> 
> 6. Tried dbOpenSnapshot option (??? static cursor) on the OpenRecordset
> method (also tried without).
> 
> I don't know what else to try,
> Anyone have any ideas? (VB code below)
> 

Unfortunately psqlodbc driver doesn't implement updatable
cursors. Probably you have to set DefaultCursorDriver property
of the ODBCDirect workspace as dbUseODBCCursor.

regards,
Hiroshi Inoue


pgsql-interfaces by date:

Previous
From: "Miller, Sam"
Date:
Subject: Re: DAO VB ODBC "read only problems
Next
From: Hiroshi Inoue
Date:
Subject: Re: DAO VB ODBC "read only problems