By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,564 Members | 1,070 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,564 IT Pros & Developers. It's quick & easy.

Getting data in one column

P: n/a
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

Feb 10 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.