Re: basic questions with odbc and visual basic.

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "Gary Doades" <gpd(at)gpdnet(dot)co(dot)uk>
Cc: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: basic questions with odbc and visual basic.
Date: 2004-09-28 14:41:31
Message-ID: 6EE64EF3AB31D5448D0007DD34EEB3412A74CC@Herge.rcsinc.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-odbc by date

  From Date Subject
Next Message Jeff Eckermann 2004-09-28 15:26:46 Re: basic questions with odbc and visual basic.
Previous Message Tom Lane 2004-09-28 14:14:15 Re: psqlODBC hangs