Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Attaching a cursor to a CA
Message
De
19/05/2017 14:36:33
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01651181
Message ID:
01651239
Vues:
50
>>>Hi,
>>>
>>>I would like to know if the following approach is possible and how. I am showing the pseudo code in exact order it has to go:
>>>
>>>1. The program creates a Cursor Adapter and of course it has a cursor. Lets name is CA_Cursor.
>>>2. The code populates/fills this cursor CA_Cursor with some records (getting them from the DB).
>>>3. The code updates this cursor CA_Cursor but does not update the DB (that is, Tableupdate() is not fired).
>>>4. The records from the CA_Cursor are copied/appended to another cursor (of exactly the same structure). Say, named CA_Second.
>>>5. Steps 2 - 4 repeated several times. Therefore, the cursor CA_Second now has records from every iteration of steps 2-4.
>>>6. Detach cursor CA_Cursor from the CA object and Attach cursor CA_Second to the CA object.
>>>7. Execute TableUpdate() to update the DB
>>
>>Why not have two cursor adapters, the first one sending no updates?
>
>Thank you. But this won't work for my case.

Why do you need a CA on the first cursor at all? The 2nd cursor sends updates, give it an adapter. The first seems like a temporary place where you crunch the records but it does it strictly locally (and I guess you requery or zap it between batches sent to second cursor), so IMO it could be just a simple cursor without an adapter.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform