Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update ADO recordsets
Message
 
À
17/01/1999 09:53:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00176986
Message ID:
00177021
Vues:
37
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
Fil
Voir

Click here to load this message in the networking platform