Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New FAQ - Merge data
Message
From
24/07/2007 17:49:33
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01243120
Message ID:
01243315
Views:
20
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform