Re: Parseing data in CSV files

From: Brian Henry (brianiupmsdn_at_newsgroups.nospam)
Date: 08/19/04


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
>>
>>
>
>



Relevant Pages

  • Re: Parseing data in CSV files
    ... > It seems as an original CSV so you can try that with OleDb ...
    (microsoft.public.dotnet.languages.vb)
  • Re: need help: list box showing item selected when none are
    ... > Hi Brian, ... > Do you mean that you want something like this in your usercontrol? ... > End Sub ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Need syntax/small footprint help
    ... although its not used in this sub. ... >Yeah, you got some interresting stuff, I am going to correlate it with ... >Anyway thanks for the look Brian... ... That "\Q" thing has got me to find out at work tommorow what it is. ...
    (comp.lang.perl.misc)
  • Re: Comments Question
    ... > Sub EnhancedComment() ... > "Brian" <blanktree at hotmail dot com> wrote in message ...
    (microsoft.public.excel.misc)
  • RE: adding record via form
    ... Brian, ... Make its CONTROL SOURCE also Employee_ID (i.e. the ... > Make three text boxes called Hire_Date, SSN, & Salary. ... >> Exit Sub ...
    (microsoft.public.access.forms)