Information générale
Catégorie:
Applications Internet
You will find the same behavior with SQL, FWIW. Basically, you are creating a new cursor, which is based on two tables. As such, when you attempt an update, ADO, and more specfically, the OLE-DB Provider for ODBC, does not know what is to be updated. Esstentially, it gets confused.
You have two choices. One alternative is to use a hierachical recordset in which you have nested tables. The other alternative is to use multiple recordsets. If you navigate to a specific record in the one recordset, you can then set the filter property or use the find method to locate related records for display. If there could be more than one match, I would suggest using the Filter Property.
HTH..
>I can select a recordset with a WHERE CLAUSE based on 2 databases
>and update records. It works when i select the fields
>from only 1 database Example project.* See Example
>
>IF i make the same selection with 2 databases project.*, rela.*
>I can not update anymore.
>
>I only need the second database for display.
>Does someone has a solution
>
>Kind regards
>
>Jan Dorresteijn
>
>
>Example
>lSql = "Select project.* from project,rela ;
> WHERE prtype=type and prcode=rcode and ;
> rela.zbedr LIKE 'BAS%' "
>
>*** This works fine
>*** If i select more fields it is going wrong
>*** Project.*, rela.*
>*** Project.* rela.bedr AS bedr
>
>
>Recordset.open(lSql,lConnection,1,2)
>Recordset.movefirst
>
>? RecordSet.fields('Prcode').value
>? RecordSet.fields('pkomschr').value
>? RecordSet.fields('pzcode').value
>
>*RecordSet.fields('pzcode').value = "TEST"
>recordset.update
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement