Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way on Updating a SQL file
Message
From
19/03/2004 18:02:37
 
 
To
19/03/2004 15:48:13
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00888043
Message ID:
00888095
Views:
9
>Hi everyone,
>
>I have been having trouble updating a SQL table with RV. I have a table Myfoo with and index and it seems to talk a while here what I have:
>
>
>Index is currently on Myitem, and I think I need to have on Myorder as well.
>
>SELECT Myfoo
>
>REPLACE ALL status WITH "4" FOR orderno = lc_Myorderno
>=tableupdate(.t.)
>REQUERY()
>
>This will be really slow on a large file.
>

The biggest problem is the fact that you are using a remote view. This means all of the data - not just the records you are interested in changing, but EVERYTHING - is going to be downloaded to the client machine before the decision on which to update is even considered.

A much better solution would be to use SQL Passthrough to do the update. This sends the update request directly to the server, without having to bring anything to the client.
Dan LeClair
www.cyberwombat.com
SET RANT ON - The Wombat Blog

Life isn’t a morality contest and purity makes a poor shield. - J. Peter Mulhern
Disclaimer: The comments made here are only my OPINIONS on various aspects of VFP, SQL Server, VS.NET, systems development, or life in general, and my OPINIONS should not be construed to be the authoritative word on any subject. No warranties or degrees of veracity are expressed or implied. Void where prohibited. Side effects may included dizziness, spontaneous combustion, or unexplainable cravings for dark beer. Wash with like colors only, serve immediately for best flavor.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform