Link to home
Start Free TrialLog in
Avatar of chem_kid
chem_kid

asked on

need to import all these fields from text file into database.

Please help me on this one.

I need to import a bunch of field along with their values from a basically non-delimited text file into a ms sql database i have set up with the appropriate tables and fiiled.  The db is set up.  I need to write the code using vb.net to import that file in.

I am clueless here.  Please help me.  I have asked this question before, and got some good answers but I was not telling the whole story, so I included the entire text file here.

Note:  There are like 2 parts to it.  First is the part with the field names followed by the values corresponding to each on a separate line.  that is fairly simple, although I do still need the code for importing that please.  

The second part is the problem.  You will notice a huge table.  there is a datetimestamp field, and then a bunch of different fields that will fill different tables which hold channel data in relation to the datetime.  This is where I am clueless.  Please help.

Please be easy on me here.  I am not really a beginner.  I have 7 years of VB experience, but not much .net.  I haven't done anything quite like this though.

askaboutdata.txt
Avatar of David Todd
David Todd
Flag of New Zealand image

Hi,

The second part could be easier depending on where your comfort zone is.

Given that the data is tab separated, it should be relatively easy to import with the BULK INSERT statement.

Look up the BULK INSERT statement in SQL BOL.

Cheers
  David
Avatar of chem_kid
chem_kid

ASKER

could someone help me out with the first part at least?  
ASKER CERTIFIED SOLUTION
Avatar of William Elliott
William Elliott
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial