>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
"Problems cannot be solved at the same level of awareness that created them." - Albert Einstein
Bruce Allen
NTX Data