ADO resync and views - Mailing list pgsql-odbc

From Tambet Matiisen
Subject ADO resync and views
Date
Msg-id 81132473206F3A46A72BD6116E1A06AE3EC01A@black.aprote.com
Whole thread Raw
List pgsql-odbc
We are doing a VB6 application with bound controls, ADO and PostgreSQL. Most database access is done through views,
whichis excellent security measure. But there is also a drawback, we cannot use Resync method of ADO recordset to
requeryrecordset contents. Resync needs to know primary key of the table, but views don't have primary key. Optimistic
lockingalso 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
recordsetfield 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
uglyand probably incompatible.
 

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

  Tambet

pgsql-odbc by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: datetime to timestamp
Next
From: Harry Broomhall
Date:
Subject: Problems with PGSQL ODBC drivers