Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to move data into a SQL-Server database?
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00540114
Message ID:
00540635
Views:
12
Hector,et al

>4) Insert a new record in the SQL-Server database/table... directly from the C program.
You can do in C, but unless you have strong reasons to do it in C, Why don't you do it in VFP?

My strong reason is to get the best performance possible. I'd be parsing and uploading millions of records per run and I want to cut the amount of file IO to the absolute minimum. I need to parse it because my data sources will vary. The production team will have the ability to determine the source data file's structure in advance, but when they hit the GO key I want this thing to run as quickly as possible.

The idea is:
1) Production team manually inspects the ascii file and uses a utility (which I supply) to indicate which sections of a line correspond to which fields.
2) The utility stores the meta data.
3) Production team hits the GO button.
4) The C program opens the source data file and the SQL Server database.
5) For each line in the source data file:
a) Parse out the line using "rules" supplied by the meta data
b) Write the data to the SQL Server database

I've done enough 3-tier work to know how to use SQL Server with VFP and will use that methodology for the rest of the app, but because of the sheer size of the source file I can't use VFP (2 Gig file limit and all that).

If I have to use ODBC or OLE, so be it. I'm trying to find out if I can bypass these intermediaries and write directly to the SQL Server database.

Regards,
Thom C.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform