Storing Data from different file formats to a Database

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2008
Posts: 5
Reputation: Programmer666 is an unknown quantity at this point 
Solved Threads: 0
Programmer666 Programmer666 is offline Offline
Newbie Poster

Storing Data from different file formats to a Database

 
0
  #1
Mar 19th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 52
Reputation: bwkeller is an unknown quantity at this point 
Solved Threads: 6
bwkeller bwkeller is offline Offline
Junior Poster in Training

Re: Storing Data from different file formats to a Database

 
0
  #2
Mar 20th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 52
Reputation: bwkeller is an unknown quantity at this point 
Solved Threads: 6
bwkeller bwkeller is offline Offline
Junior Poster in Training

Re: Storing Data from different file formats to a Database

 
0
  #3
Mar 20th, 2008
You might find this code easier to understand as it is not ASP code.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 5
Reputation: Programmer666 is an unknown quantity at this point 
Solved Threads: 0
Programmer666 Programmer666 is offline Offline
Newbie Poster

Re: Storing Data from different file formats to a Database

 
0
  #4
Mar 20th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 52
Reputation: bwkeller is an unknown quantity at this point 
Solved Threads: 6
bwkeller bwkeller is offline Offline
Junior Poster in Training

Re: Storing Data from different file formats to a Database

 
0
  #5
Mar 20th, 2008
Originally Posted by Programmer666 View Post
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC