Click to See Complete Forum and Search --> : ADO without ODBC
Eddy
Mar 22nd, 2000, 08:10 PM
Can I use ADO to access other database such as Paradox without using the ODBC? If it is possible, please show me the source code on how to establish the connection directly using ADO to access Paradox. Thanks.
FYI - I've realise that ADO connection using ODBC is quite slow.
Clunietp
Mar 23rd, 2000, 12:05 AM
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
'open connection to folder that contains DB files
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & ";Extended Properties=Paradox 5.x"
Set rs = New Recordset
'open DB file as recordset -- my file is called CATEGORI.DB
rs.Open "Select * from Categori", cn
'show data
Do Until rs.EOF = True
Debug.Print rs.Fields(1).Value
rs.MoveNext
Loop
'cleanup
rs.Close
cn.Close
Set rs = Nothing
Set cn = Nothing
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.