Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL & Foxpro views
Message
De
12/05/2000 20:05:35
Cheryl Qualset
Qualset Computer Consulting
Davis, Californie, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00367443
Message ID:
00369291
Vues:
20
>>I have a MS SQL 7 database and I need to change one table and delete many records.
>>
>
>>Can I just use a remote view in Foxpro, edit the records and delete the ones I do not want??
>>
>
>Parameterize your remote view so that it retrieves ONLY the records you want to delete.
>
>REQUERY("rv_persons")
>DELETE ALL
>CURSORSETPROP("Buffering", 5)
>TABLEUPDATE(1) && all rows
>
>>Then do I need to PACK the SQL table????
>>
>
>Nope. SQL-Server doesn't store records with a deleted mark like VFP. When you delete them, they're gone for good.
>
>
>>How I can I load an SQL table without it taking 30 minutes to load??
>>I setup a remote view to the table, but when I open it, it locks my machine until all of the records load and that is at least 30 minutes.
>>
>
>See above about parameterizing the remote view. If the result set is large and it will take a while to retrieve them, either break up the retrieve-delete into smaller subsets, or adjust the timeout intervals in your VFP connection into SQL-Server.
>
>These are the simplest ways, but there are others. You can alter the VFP connection to process asynchronously, which would free up Fox during processing, but you have to query SQLMORERESULTS() to determine when the query is done. Use can use SQL pass-thru either synchronously or asynchronously. Another very effective technique is to create a SQL view (inside SQL server) and then access it just like a SQL table with a VFP remote view. Your remote view can be parameterized, just like views on any other "table." This approach allows you to design visually in both VFP and SQL Enterprise manager, and get good performance.
>
>>THANKS
>>Joel
>>Houston, TX

Good points about table buffering, parameters, SQL Server views, etc. My $.02 is to check out the view setting that just returns the 1st n of the data set.

Bruce, do you use transactions in Mere Mortals to coordinate parent-child updates on a SQL Server back end? What methods have you employed?

Cheryl
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform