-
I am currently working on a project that uses a DBase III database. So far I have only used Access database and I am unsure how to connect to one.
Does anyone have any good connection strings? Can you use Jet with a DBaseII database or so you have to use ODBC?
I will also be needing to print out reports with this database...I was trying to use a DataEnvironment with a DataReport but so far I have had no luck.
I Have been trying to use a SHAPE command to build a hierarchy so I can use groups...I have been successful using an Access database doing this but I keep getting errors such as :
[Microsoft][ODBC dBase Driver] Too Few Parameters. Expected 1.
I wish I could could switch over to an access database it would be so much easier but I am stuck :(
Anyone have any suggestions?
-
you can connect with ADO this way
Code:
'uses ADO 2.1 or higher (Jet 4)
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 III"
'name of DBF file here
Set rs = cn.Execute("Select * from Customers")
MsgBox rs.Fields(1).Value
cn.Close
Set cn = Nothing