PDA

Click to See Complete Forum and Search --> : dBase IV -> ADO


R@emdonck
Feb 25th, 2000, 08:23 AM
Hi,

Can somebody tell me how I can make connection to
a "dBase IV" file (*.dbf) using ADO.

R@emdonck

Clunietp
Feb 27th, 2000, 12:42 AM
Hello


Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset

Set cn = New ADODB.Connection

'open connection to FOLDER with DBF file
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyDirWithData\;Extended Properties=DBase IV"

Set rs = cn.Execute("Select * from Customers") 'name of DBF file here

MsgBox rs.Fields(1).Value

cn.Close

Set cn = Nothing


Enjoy

Tonatiuh
Feb 28th, 2000, 11:49 PM
Another tool could be the 'DataDirect Connect ODBC' from Merant Intersolv. This is a set of ODBC drivers to access to almost all databases. You can download an evaluation copy from www.intersolv.com.

Good look!


Edited by Tonatiuh on 02-29-2000 at 12:51 PM