Re: Parseing data in CSV files
From: Brian Henry (brianiupmsdn_at_newsgroups.nospam)
Date: 08/19/04
- Next message: Herfried K. Wagner [MVP]: "Re: Closing a file and the form"
- Previous message: One Handed Man \( OHM - Terry Burns \): "Re: Detect Change in PC Name"
- In reply to: Brian Henry: "Re: Parseing data in CSV files"
- Next in thread: jb: "Re: Parseing data in CSV files"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 19 Aug 2004 14:06:34 -0400
it worked, thanks!
"Brian Henry" <brianiupmsdn@newsgroups.nospam> wrote in message
news:esX0j7ghEHA.1276@TK2MSFTNGP09.phx.gbl...
> that might be what I need, thanks, I'll try it out
>
> "Cor Ligthert" <notfirstname@planet.nl> wrote in message
> news:u3KTmbghEHA.1964@tk2msftngp13.phx.gbl...
>> Brian,
>>
>> It seems as an original CSV so you can try that with OleDb
>>
>> Private Sub Form1_Load(ByVal sender As Object, _
>> ByVal e As System.EventArgs) Handles MyBase.Load
>> Dim file As String = "Test2.txt"
>> Dim path As String = "C:\Test1\"
>> Dim ds As New DataSet
>> Try
>> Dim f As System.IO.File
>> If f.Exists(path & file) Then
>> 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")
>> End If
>> Catch ex As Exception
>> MessageBox.Show(ex.ToString)
>> End Try
>> DataGrid1.DataSource = ds.Tables(0)
>> End Sub
>>
>> I hope this helps a little bit?
>>
>> Cor
>>
>>
>
>
- Next message: Herfried K. Wagner [MVP]: "Re: Closing a file and the form"
- Previous message: One Handed Man \( OHM - Terry Burns \): "Re: Detect Change in PC Name"
- In reply to: Brian Henry: "Re: Parseing data in CSV files"
- Next in thread: jb: "Re: Parseing data in CSV files"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|