Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Databases Basics
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 8th, 2007, 07:13 AM
Registered User
 
Join Date: Apr 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default A parsed text file to an Access table?

I'm the newbie. Is there a simple way to put my parsed text file ('*' delimited) 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).

Maybe my entire approach is wrong.

Jim





Similar Threads
Thread Thread Starter Forum Replies Last Post
A parsed text file to an Access table? josmith2 ADO.NET 0 May 10th, 2007 01:52 PM
text file convert to table mohiddin52 Access VBA 5 August 14th, 2006 01:10 PM
Text File-Newbie VBA Access mbeirn Access VBA 1 October 6th, 2005 07:18 AM
Importing text data to an access table sbyers_1982 VBScript 4 November 29th, 2004 01:57 PM
text file to access treasacrowe Classic ASP Databases 13 October 28th, 2004 11:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.