Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How connect to dBase from VB 6.0?

Status
Not open for further replies.

VNDN

Programmer
Feb 28, 2003
27
US
Hello all,
Can you show me how to connect to dBase. Thank you much in advance. CVL
 
What kind of data access are you using to try to connect Mark

The key to immortality is to make a big impression in this life!!
 
Here are 2 samples... for DAO and ADO.

DAO

Sub DAOOpenISAMDatabase()

Dim db As DAO.Database

Set db = DBEngine.OpenDatabase(".\Sales.xls", _
False, False, "DBASE Extended Property;")

db.Close

End Sub
ADO

Sub ADOOpenISAMDatabase()

Dim cnn As New ADODB.Connection

cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=.\Sales.xls" & _
";Extended Properties=DBASE Extended Property;"

cnn.Close

End Sub

These are the Extended properties for DBase
dBASE III
dBASE IV
dBASE 5
Craig, mailto:sander@cogeco.ca

In the computer industry, there are three kinds of lies:
lies, damn lies, and benchmarks.
 
Craigsander,
I have an error("Could not find an installable ISAM driver") when I used your code. Thanks CVL
 
Check your machine for MSXBSE35.dll. It needs this if it's going to use the XBAse drivers. Mark

The key to immortality is to make a big impression in this life!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top