The code I used is:
#include <_sql_mod.au3>
#include <array.au3>
$FilePath = "P:\Atto\GestPro\ARELCO.g32\"
$db_adodb = _SQL_Startup()
$ret = _SQL_ParadoxConnect($db_adodb, $FilePath,$FilePath)
;$ret = _SQL_ParadoxJetConnect($db_adodb, $FilePath,$FilePath)
If $ret = $SQL_OK Then
Local $aResult, $iRows, $iColumns
$vQuery = "SELECT * FROM MRF2009"
_SQL_GetTable2D($db_adodb, $vQuery, $aResult, $iRows, $iColumns)
_ArrayDisplay($aResult)
_SQL_Close($db_adodb)
Else
MsgBox(48,"Eroare","Nu merge!")
EndIf
where _SQL_ParadoxConnect is:
Func _SQL_ParadoxConnect($ADODBHandle = -1, $sFilePath1 = "",$Dir="")
$SQLErr = ""
If $ADODBHandle = -1 Then $ADODBHandle = $SQL_LastConnection
If Not IsObj($ADODBHandle) Then
$SQLErr = "Invalid ADODB.Connection object, use _SQL_Startup()"
Return SetError($SQL_ERROR, 0, $SQL_ERROR)
EndIf
$ADODBHandle.Open("Driver={Microsoft Paradox Driver (*.db )};DriverID=538;Fil=Paradox 5.X;DefaultDir="&$Dir&";Dbq=" & $sFilePath1 & ";CollatingSequence=ASCII;")
If @error Then
$SQLErr = "Connection Error"
Return SetError($SQL_ERROR, 0, $SQL_ERROR)
EndIf
Return SetError($SQL_OK, 0, $SQL_OK)
EndFunc
and _SQL_ParadoxJetConnect is:
Func _SQL_ParadoxJetConnect($ADODBHandle = -1, $sFilePath1 = "",$Dir="")
$SQLErr = ""
If $ADODBHandle = -1 Then $ADODBHandle = $SQL_LastConnection
If Not IsObj($ADODBHandle) Then
$SQLErr = "Invalid ADODB.Connection object, use _SQL_Startup()"
Return SetError($SQL_ERROR, 0, $SQL_ERROR)
EndIf
;
$ADODBHandle.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&$sFilePath1&";Extended Properties=Paradox 5.x;")
If @error Then
$SQLErr = "Connection Error"
Return SetError($SQL_ERROR, 0, $SQL_ERROR)
EndIf
Return SetError($SQL_OK, 0, $SQL_OK)
EndFunc