Hello everyone,

I have a file that I need to parse and move the data into a database table. Here is a sample of some rows:

"Engine/Control" "moteur/commande" "Motor/Steuerungs" "motor/control" "" 1320
"Transmission" "boite de vitesses" "Getriebe" "transmision" "" 1321

As you can see the data does not have a separator like a comma. Plus the last piece of data is an int. I would like a few ideas on how to grab each of these values.

I am already reading the txt file line by line, but now that I have the line in a string variable how do I parse it out into separate values I can use to insert into a database?

Any ideas?

Looking at your data, it appears each value you want is 'delimited' by " " (quote-space-quote).

Have you tried using String.Split to separate the text data from each line?

I don't know about reading the int but if every line is in succession, that should be easy to substitute the int as you read each line...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.