ADO-Connection to Dbase without DNS
Hello NG,
I want to open a ADO-Connection to a dbase-File. Because I have to change
dynamic the datasources, I dont want to use a fixed DSN. Now I am trying to
write the connectionString just mentioning Drivername and Database.
Following string does not work:
Set cnn = New ADODB.Connection
cnn.ConnectionString = "Driver={Microsoft dBase Driver (*.dbf)};" & _
"database=d:\MyFolder"
cnn.Open
rs.Open "MyFile", cnn
Errormessage is, that the file could not be found. Same procedure with a DSN
works perfect, and trying the SQL Server Driver to a MS SQL Server Database
works too.
Thanks for any help, Andreas
--
Herzliche Gr?e
*****************************************
Andreas J?ndl, Dipl.-Ing. agr.
ECOZEPT GbR
Obere Hauptstr. 29, 85354 Freising
Tel: 08161-41315, Fax: 08161-41325
www.ecozept.de