Opening ,dbf file through ADO in VB6?
Hello,
I am trying to open a Dbase File using VB6 ADODB connection. I am getting this error message: "Path is not a valid path. Make sure that the path is spelled correctly and that you are connected to the server on which the file resides."
I know and know that the 2 conditions are met. The code is as follows:
___________
Private Sub Form_Load()
Dim Conn
Set Conn = CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\CUSTOMER.DBF;Extended Properties=DBASE IV"
End Sub
___________
I know you can open dbf with ADO. and as far i can see in the documentation, the 'extented properties' paremeter is important, i tried the above and also tried one other format:
... Extended Properties=""DBASE IV;"";"
and that gave the same error message.
I can open the dbf file easily from a DAO control, by specifying the table name in 'recordsource' and 'dbase IV' in Connect property; but I want to do it in ADO so i can have more flexibility in controlling the record source at run time.
Thank you for any input,
Regards and God bless
vchell
|