Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to update table from a cursor (no view)
Message
From
03/09/2007 19:11:31
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01252051
Message ID:
01252052
Views:
24
>I would like to learn a technique (efficient and fast) to update a table from a cursor. The application does not use views but instead loads records from a table (VFP or SQL Server) into a cursor. A number of records in this cursor are updated all at once. Then I need to update the underlying table from this cursor.
>
>How do you suggest doing it?
>
>Thank you in advance.

Using a view is, precisely, the easiest way to do it. Visual FoxPro takes care of the details. Note that the view creates a cursor, which can be modified.

Otherwise, I believe you would probably have to loop through the records, and program all the logic yourself - checking whether there were changes, which records are new, whether any records were deleted, and updating those changes.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform