Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding Records to an SQL Server table
Message
From
03/10/2007 14:20:42
Dave Nantais
Light speed database solutions
Ontario, Canada
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Adding Records to an SQL Server table
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01258301
Message ID:
01258301
Views:
61
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.
Next
Reply
Map
View

Click here to load this message in the networking platform