ADO resync and views

From: "Tambet Matiisen" <t(dot)matiisen(at)aprote(dot)ee>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: ADO resync and views
Date: 2003-01-08 10:42:11
Message-ID: 81132473206F3A46A72BD6116E1A06AE3EC01A@black.aprote.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc


We are doing a VB6 application with bound controls, ADO and PostgreSQL. Most database access is done through views, which is excellent security measure. But there is also a drawback, we cannot use Resync method of ADO recordset to requery recordset contents. Resync needs to know primary key of the table, but views don't have primary key. Optimistic locking also does not behave exactly as we would like.

So far I have tested these options:
1. Force ADO to think that one of the fields is primary key - not possible, because KEYCOLUMN dynamic property of recordset field object is read-only.
2. ALTER TABLE test ADD PRIMARY KEY (a) - not possible, gives ERROR: ALTER TABLE: relation "test" is not a table
3. Create PostgreSQL table with primary key and then create SELECT rule on that - works, but is very cumbersome and ugly and probably incompatible.

Anyone with the same problem? An ideas how to do this?

Tambet

Browse pgsql-odbc by date

  From Date Subject
Next Message Harry Broomhall 2003-01-08 17:33:47 Problems with PGSQL ODBC drivers
Previous Message Christina 2003-01-08 10:20:43