Mike Yearwood
Toronto, Ontario, Canada
Information générale
Catégorie:
Codage, syntaxe et commandes
>>Hey all
>>
>>Check out FAQ#33156
>
>Mike,
>
>1). I would assume that you first want to update records and then insert new records (less records to process - quicker the process)?
Yes, I started with that as the title of the FAQ. :)
>2) With lots of fields to be changed and unknown frequency of the changes would you have to list all the fields in OR condition?
I always list all the fields. Some people seem afraid to type?!?! :) For them build the field list as a string.
> Perhaps it's better to update only particular field's changes rather than all field changes even if the field was not changed?
No. One replace command with 10 fields beats 10 replace commands each with 1 field. VFP does not just send the 10 bytes that changed in the record. Although you can tell SQL Server to just update one field, but you need to send more than just the data along the wire to do that.
> What if the field has some field validation rules?
I haven't tried it, but I think one could get the field validation rule via DBGetProp and add it to the OR conditions. Then you'd need a way to log the failures and report them.
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