Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding Records to an SQL Server table
Message
De
03/10/2007 14:20:42
Dave Nantais
Light speed database solutions
Ontario, Canada
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Adding Records to an SQL Server table
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01258301
Message ID:
01258301
Vues:
59
I am working with an old VFP program that reads records in from a text file and appends them 1 record at a time with a command something like....

=SQLEXEC(m.lnHandle,"INSERT INTO Customer (column1,column2) VALUES ('HELLO','WORLD')

When the text file contains 10,000 records this causes 10,000 separate SQLEXECs against the server.

Is there anything similar to a TableAdapter.Fill method in VFP.

Is there a more efficient was in VFP to add a large amount of new data to an SQL Server table?

In C# I use the basic dataset... tableadapter ... fill paradigm... and it seems to work well.

I also have at my disposal VFP 9 .. if it happens to have a similar functionality to C#.
Or is a single record SQLEXEC insert command executed 10,000 different times within a FOR loop actually the most efficient method of updating an SQL Server table.. in VFP?

TIA,
Dave.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform