I dont know how convert it to dataset or XML...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

H

I'm trying to import a | seperated text from string variable which represents a tabl
with several fields, eg

6124079|PRIRUBA 11 DN250 PN6;CSN131160.0;11369.1;CSN131005.50|KS|11,100000|3437,
6124080|PRIRUBA 11 DN200 PN6;CSN131160.0;11369.1;CSN131005.50|KS|8,870000|2761,

I dont know how convert it to dataset or XML...
Is there any function in .NEt or must I implement myself

Thank
Pavel
 
Hi Pavel,

I do not see any regularity in those strings, however you can make from a
textfile a dataset. But I am in doubt about this one.

Have a look at the connections strings for a start. The rest is almost the
same as a regular fill.

http://www.connectionstrings.com/

Dim ConStr As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
path & ";Extended Properties=""Text;HDR=No;FMT=Delimited\"""
Dim conn As New OleDb.OleDbConnection(ConStr)
Dim da As New OleDb.OleDbDataAdapter("Select * from " & _
file, conn)
da.Fill(ds, "TextFile")

This is for a CSV file where "file" is the full filename.

I hope this helps?

Cor
 
Back
Top