
ADO/ADOX dBASE III connection/catalog issue...
Hi,
I am experiencing the following problem in VB6(SP5). (I
am referencing ADO 2.7 and ADOX 2.7 in my project).
Here's my code snippet:
____________________________
Option Explicit 'All variables must be declared...
'General Declarations section of Form1 code module...
'References: ADO 2.7 and ADOX 2.7...
'ADO Connection Object for dBASE III Database...
Private csConn As New ADODB.Connection
'ADO Catalog Object for dBASE III Database...
Private csCat As New ADOX.Catalog
Private Sub Form_Load()
'Open ADO Connection with ODBC DSN value of "B_CS-
7_00_m1minn"...
csConn.Open "B_CS-7_00_m1minn"
'Set Catalog ActiveConnection to csConn...
Set csCat.ActiveConnection = csConn
'Get count of dBASE III Database Tables...
Debug.Print csCat.Tables.Count '*****
End Sub
When the code gets to the '***** line an error dialog
box with the error message below appears:
'---------------------------------------------------
'ERROR CODE: '-2147217887 (80040e21)':
'
'Multiple-Step OLE DB operation generated errors.
Check each OLE DB
'status value, if available. No work was done.
'---------------------------------------------------
What am I doing wrong? Any suggestions? I have found
dBASE III to be a constant pain in the neck. I also have
to talk to the same data structure on an ORACLE
platform...hence the use of ADO. Any suggestions would be
greatly appreciated.
Thanks Everyone,
Brian