Re: basic questions with odbc and visual basic. - Mailing list pgsql-odbc

From Merlin Moncure
Subject Re: basic questions with odbc and visual basic.
Date
Msg-id 6EE64EF3AB31D5448D0007DD34EEB3412A74CC@Herge.rcsinc.local
Whole thread Raw
In response to basic questions with odbc and visual basic.  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
List pgsql-odbc
> On 27 Sep 2004 at 16:42, Merlin Moncure wrote:
> The only reason the ADO driver would build an update statement using
> all columns is that it can't identify a unique key (primary key). It's
> possible that the ODBC driver does not correctly supply this info.
>
> Can you do something artificial like put an additional unique index on
> the primary key?

There are several unique indexes on most of my tables.  Access correctly
determines the primary key for the raw tables (and for the views, allows
me to select the correct one).  It pulls the data out by the p-key, but
rights it back using the whole row.  Same for bound recordset in vb.

Using Zeos components and Delphi (actually C++ builder), I have no
problems writing back data through the OLE DB wrapper for the ODBC
driver (itself thinly wrapped by Zeos).  In fact, this even gets the
tangential cases correct such as domains and arrays.

I can only surmise that the VB/Access runtimes are building the spurious
update statement.  Using views and constraining things to a few columns,
I can update a view through access or vb.  Can you confirm that your
update statements use the p-key in the where clause of your update
statements (only)?

Thx for help all.

Merlin


pgsql-odbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: psqlODBC hangs
Next
From: Jeff Eckermann
Date:
Subject: Re: basic questions with odbc and visual basic.