Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to save changes using cursoradapters
Message
 
À
28/09/2004 11:31:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00946708
Message ID:
00946750
Vues:
13
This message has been marked as a message which has helped to the initial question of the thread.
You must use TableUpdate() for CA too. Bur as Lisa said You must describe ALL updatable fields in oCA.UpdateNameList & oCA.UpdateableFieldList

>Hi all,
>
>Is saving of data using CursorAdapter (ADO) implicit based the relevant CA properties? See example:
>
>* assume CA is valid and returns a cursor: Temp_.whse, Temp_.prod, Temp_.Inv .
>set multilocks on
>oCA.tag = "Provider=VFPOLEDB.1;Data Source=DATAFILE;Password='';Collating Sequence=MACHINE;"
>oCA.datasourcetype = "ADO"
>oCA.flags = 0
>oCA.fetchasneeded = .t.
>oCA.prepared = .f.
>oCA.updatecmddatasource = "ADO"
>oCA.selectcmd = "SELECT * FROM Whseprods WHERE Whse = ?cWhse and Prod = ?cProd"
>oCA.KeyFieldList = "WHSE, PROD"
>oCA.UpdateNameList = "WHSE Whseprods.Whse, PROD Whseprods.prod, CALCDEPLOY Whseprods.Calcdeploy"
>oCA.UpdatableFieldList = "CALCDEPLOY"
>oCA.Tables             = "Whseprods"
>oCA.SendUpdates        = .T.
>cWhse = "W1"
>cProd = "P1"
>oCA.RefreshCursor()
>replace temp_.inv with 100
>skip && is the record updated back to the base table here?
>* with views I can issue a TABLEUPDATE() to send the updates, is there something I have to call?
>
>
>My updates are not sent back to the table.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform