PDA

Click to See Complete Forum and Search --> : Updating Recordsets


carolyn
Jul 18th, 2000, 02:11 AM
I'm using VB5 SP3 with PostgreSQL V6.5 and PsqlODBC.

A Recordset based on joined tables. It's opened as Dynaset type recordset. However, I get the following error message at Update method:


Positioned request cannot be performed because result set was generated by a joined table.


The joined condition is used to retreive code description from another table.

According to online doc, one of the condition that the recordset cannot be updated is:


The Recordset object was either created from multiple tables without a JOIN statement or the query was too complex.


All the fields I want to update are from 1 table only. The 'DataUpdatable' property of the fields are all TRUE, and the 'Updatable' propery of the recordset is also TRUE.

Ianpbaker
Jul 18th, 2000, 02:51 AM
Hi carolyn

I think the only way to get around this, is to use another recordset. Get your primary key for the first table from your joined recordset and then open up a new recordset with just that record. "SELECT * FROM table1 WHERE id =" & strId

Hope this helps

Ian

carolyn
Jul 18th, 2000, 08:37 PM
Thank you for your suggestion.