Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating one column of many records CA
Message
De
22/05/2017 05:36:17
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:
01651281
Message ID:
01651300
Vues:
45
>Hi,
>
>I have yet another question on Cursor Adapter. Almost all my program updates are done using Cursor Adapter.
>
>I am looking at this case where one field of the SQL Server table has to be updated. The number of records is unknown but could vary from several hundred to several thousand. I have never done update of a SQL Server table where the number of records in the CA cursor is greater than about 1000. But in this case, it could be several times more (even up to 10,000). Note that only one field will be changed in the CA cursor and therefore send back for update. Does it matter? That is, would it make a difference for the reliability of such update (time is not important, a few more seconds or even a minute is ok) when one field has been changed or more than one field?

Use a subclassed cursoradapter and then in the debugger check the SQL statement it creates (in .beforeupdate()). I think the only difference would be the number of fields included in the statement, which is IIRC based on getfldstate() values. So the statement will be shorter if fewer fields. I don't see much of a difference otherwise. Ah and make sure you use the wheretype=1 (just pk) because the default is 3 (pk and changed fields) which can create quite a lengthy where clause, including oldval() of each changed field.

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