Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mapping Data
Message
From
07/09/2004 00:01:04
Keith Payne
Technical Marketing Solutions
Florida, United States
 
 
To
03/09/2004 19:13:07
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Miscellaneous
Thread ID:
00938984
Message ID:
00939843
Views:
15
>Thanks Hector
>
>I figured as much. I'll just write my own, again. It won't be bad. I've actually done it 3 times in VFP, and I've got the process down pretty well. It's just a tedious task!
>
>
>
David,

I have found that using the Jet ODBC text driver makes it easier to coerce text files into a format with standard field names and widths. For instance, I store the different source formats in an SQL table - assuming there will be a finite set of formats - and generate a schema.ini file on the fly. See http://support.microsoft.com/default.aspx?scid=kb;en-us;149090 for a sample schema.ini file.

After writing the schema.ini file to the same directory as the text file, I use the OleDb DataReader to SELECT all of the rows and call the appropriate INSERT stored procedures to get them into SQL Server.

A slightly heavier method would be to create a strongly-typed DataSet that is based on the destination table. Then you could Fill the DataSet with the OleDb connection and Update the DataSet with a SQL connection.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform