Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Appending data from a text file
Message
From
25/01/2008 15:50:20
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
25/01/2008 13:23:19
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01285552
Message ID:
01285642
Views:
21
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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform