p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ADO.NET (http://p2p.wrox.com/forumdisplay.php?f=109)
-   -   A parsed text file to an Access table? (http://p2p.wrox.com/showthread.php?t=57733)

josmith2 May 10th, 2007 01:52 PM

A parsed text file to an Access table?
 
I'm the newbie. Is there a simple way to put my parsed text file into an Access table? I've seen examples on how to update or add on record at a time but is there a way to do the entire table.

Coming from here:

<snip> ==== This Works Fine ====
Schema.ini in place

        Dim CString As String = _
            "Provider=Microsoft.Jet.OLEDB.4.0;" & _
            "Data Source=C:\;" & _
            "Extended Properties=""text;HDR=No;"""
        Dim TConnect As New System.Data.OleDb.OleDbConnection(CString)
        TConnect.Open()
        Dim da As New System.Data.OleDb.OleDbDataAdapter("Select * from 837P.txt", TConnect)
        Dim ds As New DataSet("Bananas")
        da.Fill(ds)
        DataGridView1.DataSource = ds.Tables(0)
<snip>

How do I get that ds.tables(0) into a table here?

 Dim AString As String = _
            "Provider=Microsoft.Jet.OLEDB.4.0;" & _
            "Data Source=C:\abc.mdb;"

I just can't see how to reference that DataSet(Bananas).

Jim


All times are GMT -4. The time now is 05:11 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.