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.
Printable View
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.
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
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.