Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fastest way to copy sql server data to a dbf?
Message
 
 
À
26/07/2011 15:23:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01519248
Message ID:
01519251
Vues:
81
>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.

BCP is the way to go or SSIS package scheduled as a job to run.

I suggest to look into second alternative.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform