The more general approach then is to use ADO. Add "Microsoft ActiveX Data
Objects" to your references. The basic idea is as follows - the details, of
course, depend on exactly what you want to do:
Sub TestADO()
Dim MyDB as ADODB.Connection ' This will be your "link" to the paradox
database
Dim MyRS as ADODB.Recordset ' This will store the results of your query
Dim CStr as String ' the connection string; specifies the database driver
and file
Dim SQLStr as String ' for building your SQL query
CStr = "?" ' You would need to find the proper connection string for your
database; consult documentation or online support (e.g. search net for
"paradox connection string")
Set MyDB = New ADODB.Connection
MyDB.Open CStr ' Opens the database connection
Set MyRS = New ADODB.Recordset ' prepare the recordset
' You may want to set your recordset properties here, e.g. cursor type,
cursor location; see ADO documentation
SQLStr = "?" ' write a query in SQL and store it in a string variable
MyRS.Open SQLStr, MyDB ' executes the query
While Not(MyRS.EOF) ' Loop through the result set
' Show the first field name and value:
MsgBox MyRS.Fields(1).Name & ": " & MyRs.Fields(1).Value
' Any other fields will be referenced in the same way
WEnd
MyRs.Close ' Be sure to close the recordset
MyDB.Close ' Important to close the connection!
Set MyRs = Nothing
Set MyDB = Nothing
End Sub
For specifics, the documentation for ADO can be found here:
http://msdn.microsoft.com/library/d...ml/dvconChoosingRightDataAccessTechnology.asp