S
sags
Hi ,
Iam a new uesr of this group.
I have a small doubt . Iam using the code mentioned below to retrive
the data from tab delimited text file ., but Iam getting all the
columns of the text file in one data grid column.
Dim file As String = "test.txt"
Dim path As String = "C:\"
Dim ds As New DataSet("Textfiles")
Try
Dim f As System.IO.File
Dim a = path & file
If f.Exists(path & file) Then
Dim ConStr As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
path & ";Extended
Properties=""Text;HDR=yes;FMT=Delimited;"""
Dim conn As New OleDb.OleDbConnection(ConStr)
Dim da As New OleDb.OleDbDataAdapter("Select * from " &
file, conn)
da.Fill(ds, "test.txt")
End If
Catch ex As Exception
End Try
Can anybody tell me Y Iam getting the .txt data in one column only.
Thanks
Sags
Iam a new uesr of this group.
I have a small doubt . Iam using the code mentioned below to retrive
the data from tab delimited text file ., but Iam getting all the
columns of the text file in one data grid column.
Dim file As String = "test.txt"
Dim path As String = "C:\"
Dim ds As New DataSet("Textfiles")
Try
Dim f As System.IO.File
Dim a = path & file
If f.Exists(path & file) Then
Dim ConStr As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
path & ";Extended
Properties=""Text;HDR=yes;FMT=Delimited;"""
Dim conn As New OleDb.OleDbConnection(ConStr)
Dim da As New OleDb.OleDbDataAdapter("Select * from " &
file, conn)
da.Fill(ds, "test.txt")
End If
Catch ex As Exception
End Try
Can anybody tell me Y Iam getting the .txt data in one column only.
Thanks
Sags