943,667 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 2342
  • VB.NET RSS
Mar 19th, 2008
0

Storing Data from different file formats to a Database

Expand Post »
Hi Friends,
I am new to VB.Net 2005.I need to create a program which will store data from text files,word documents,excel files,xml files to a database.Can anyone help me.it is urgent.Thank you.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Programmer666 is offline Offline
5 posts
since Mar 2008
Mar 20th, 2008
0

Re: Storing Data from different file formats to a Database

If using SQL Server create an Image or nVarChar field in your database table to hold the data. The process is not that different from storing a picture so this code should help a lot. You will basically choose a file, open it as a FileStream and read it into a buffer that you will upload to the database. You can even use the built-in compression processing by pushing it through a GZipStream. Also store the original filename and you can pull it back out and reconstitute the file easily.
Reputation Points: 12
Solved Threads: 6
Junior Poster in Training
bwkeller is offline Offline
52 posts
since Feb 2008
Mar 20th, 2008
0

Re: Storing Data from different file formats to a Database

You might find this code easier to understand as it is not ASP code.
Reputation Points: 12
Solved Threads: 6
Junior Poster in Training
bwkeller is offline Offline
52 posts
since Feb 2008
Mar 20th, 2008
0

Re: Storing Data from different file formats to a Database

Thanks Bwkeller, But perhaps I wasnt clear enough.I have data in a text files,Excel Files ,Word Document .Its like it has details of peoples are in the files like Name,Address,Phone Number,Age ,DOB.I need to take the data's from ,text files and Excel Files,Word Documents . I need put those data's from these different types of file in a database.Hope I am able to explain what I want.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Programmer666 is offline Offline
5 posts
since Mar 2008
Mar 20th, 2008
0

Re: Storing Data from different file formats to a Database

Thanks Bwkeller, But perhaps I wasnt clear enough.I have data in a text files,Excel Files ,Word Document .Its like it has details of peoples are in the files like Name,Address,Phone Number,Age ,DOB.I need to take the data's from ,text files and Excel Files,Word Documents . I need put those data's from these different types of file in a database.Hope I am able to explain what I want.
Well that is a different matter. You would have to look up the different APIs for the different file formats. This is how to read Word files with C# which can be converted to VB.NET here. This code reads Excel files using VB.NET and text files can be read pretty natively with VB.
Reputation Points: 12
Solved Threads: 6
Junior Poster in Training
bwkeller is offline Offline
52 posts
since Feb 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Populate ListView VB.NET 2005 from DB Tables
Next Thread in VB.NET Forum Timeline: Taking Values from another form to Table layout panel ("How?")





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC