Results 1 to 3 of 3

Thread: opening dBase table at runtime

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Location
    Tiffin, OH, USA
    Posts
    5

    Post

    I need to open a dBase table at runtime, but the OpenDatabase() method reports that the database is a unrecognized format.

    Is there some other method that I can use to open this table??

    Thanks.

  2. #2
    Addicted Member
    Join Date
    Oct 1999
    Posts
    232

    Post

    Try it:
    ------------------

    Dim db As Database
    Dim tbl1 As Table
    Dim dbName$, Connect$

    Connect = "dBASE IV;" ' Specify database type
    dbName = "D:\DBASEIV" ' Specify database directory

    Set db = OpenDatabase(dbName, False, False, Connect)
    Set tbl1 = db.OpenTable("Table1") ' Open table

    ------------------
    smalig
    [email protected]
    smalig.tripod.com

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Location
    Tiffin, OH, USA
    Posts
    5

    Post

    Thanks, but that didn't quite work. Here's the code that worked for me:
    -------------------------------------------
    Dim PlayerDB As Database
    Dim dbName$, Connect$
    Set PlayerDB = OpenDatabase(dbName, False, False, Connect)

    Set dtaPlayers.Recordset = PlayerDB.OpenRecordset("Select * from Players.dbf")
    -------------------------------------------

    Thanks.

Posting Permissions

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



Click Here to Expand Forum to Full Width