>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.comSET RANT ON - The Wombat BlogLife isn’t a morality contest and purity makes a poor shield. - J. Peter MulhernDisclaimer: 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.