Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Feb 2002
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excel - txt file with DAO (Access 97)

    i am trying to read database structures / data from dBase, Foxpro, textfiles and excel using DAO,

    i am not getting anywhere in this matter,
    can someone provide an example so it gets me on the way? (i can not even open a dbf, txt, xls ... or know how to...)

    thanx
    ExpertNot

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel - txt file with DAO (Access 97)

    Here is a sub to open a Foxpro file in DAO
    <pre>Sub OpenFoxpro()
    Dim i As Integer
    Dim db As Database
    Dim rst As Recordset
    ' Open the database with the directory specified.
    Set db = OpenDatabase("f:bijmarconieurokas", True, False, "FoxPro 2.5;")
    Set rst = db.OpenRecordset("klanten.dbf", dbOpenDynaset)
    Do While Not rst.EOF
    Debug.Print rst!naam
    rst.MoveNext
    Loop
    End Sub</pre>

    For additional information have a look at <A target="_blank" HREF=http://support.microsoft.com/default.aspx?scid=kb;en-us;Q132018>How to Use OpenDatabase to Open 3rd Party Database Files (Q132018)</A>
    Francois

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •