Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / December 2004

Tip: Looking for answers? Try searching our database.

Using .NET to import a delimited text file into an Access database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
temp@whocallmetim.net - 21 Dec 2004 21:18 GMT
Greetings!

I have been attempting for the past two days to create a fast and
efficient way of importing data from a delimited text file into an
Access database.  I've (finally) found out how to get the text file
into a DataSet using the OLE DB classes and have no problems viewing
the data.  Now I cannot seem to put it into an Access database!

I've tried using various methods available to the DataSet and
DataAdapter classes and checked out many web references on how to work
with these classes.  But the references aren't of much assistance and
using the methods for the classes, while able to compile and run
successfully, does not actually put the data into the Access database!
The only way I've found to import the data is to enumerate through the
DataRows of the DataSet, create an INSERT statement from the data, and
perform the query.  Given the proported functionality of .NET, there
has to be a faster, more efficient, and above all simple way of doing
this!

Can anyone provide me with some pointers, books, or sites to assist me?
Thanks.
David Browne - 21 Dec 2004 22:30 GMT
> Greetings!
>
[quoted text clipped - 14 lines]
> has to be a faster, more efficient, and above all simple way of doing
> this!

Actually this is very simple, and much faster in Access.  Just open the
Access database and add a linked table pointing to your text file.   Then

Insert into MyTable select * from MyLinkedTextFile

.  It .NET is's much harder more indirect, and much much slower because you
have to generate single-row inserts for each row.

David

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.