Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fastest way to copy sql server data to a dbf?
Message
From
26/07/2011 19:33:58
 
 
To
26/07/2011 15:23:13
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01519248
Message ID:
01519268
Views:
62
>I have a program that gets data from sql server and puts it into vfp tables (free tables). From there reporting is done against the dbfs. This needs to be done multiple times a day. One table, tblactivity, has about 500K records.
>
>Regarding the following code:
>lnr=sqlexec(lnh,"select * from tblactivity","curactivity") && takes 30 or 40 seconds
>copy to tblactivity_vfp && takes a few minutes?? haven't benchmarked exactly, but it is slow
>
>Is there a way to speed this up? Years ago I used BCP, don't remember much about it right now, but thinking it would speed up writing to a text file, but then I'd have to append into a dbf anyway.
>
>Is there any way to bypass sending results to a cursor first, a way to use sqlexec to go straight to a dbf?
>Any way to speed up the copy to?
>
>Thanks.

Maybe I'm missing something obvious, but frx reports will work against any cursor you point them at. Why not just use remote views against the sql, massage the data however you like, parameterize, whatever?


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Previous
Reply
Map
View

Click here to load this message in the networking platform