Jerry,
I meant to do that with C# using VFPOLEDB:)
You could also create a datatable and load the data into it parsing.
Yet another alternative is to create an xml filedescribing the layout and use as an .fmt file for bulk insert.
Cetin
>We currently have a VFP app that creates a cursor to match the text file, append the text file into the cursor and then write the data to SQL Server.
>
>However, we are looking for a way to do this within .Net using C#. We thought we could create a DataTable with the proper structure and import the text file.
>
>Is there a way to import a text file(SDF) into a DataTable?
>
>Thanks,
>
>Jerry
>
>
>
>
>>>I have a text file in SDF format that I need to programmatically add to a SQL Server table. How can I do this?
>>>
>>>Thanks,
>>>
>>>Jerry
>>
>>Jerry,
>>Probably easiest would be to upload a temporary VFP table that you create using VFPOLEDB and then loading to SQLserver with SqlBulkCopy class.
>>Cetin