Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way on Updating a SQL file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00888043
Message ID:
00888108
Vues:
12
>>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.

Not necessarily. You should write the Remote View properly so that it pulls only the records you are interested in updating to begin with.

If you have a relatively weak SQL Server with a large amount of machines connecting to it doing heavy updates, you will definitely be better off using properly written remote views.

Remote views also give you quite a bit more flexibility than SPT.

Sometimes SPT is the best solution. It depends on you server/client situation.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform