Wzaf,
What FWH version are you using ? Harbour or xHarbour, what version ?
Wzaf,
What FWH version are you using ? Harbour or xHarbour, what version ?
In case of MySql we are compelled to use ODBC driver. There is no free OLEDB provider available. The total functionality of ADO is not supported by ODBC. We need to work with these limitations while working with MySql. We can not expect whatever that works with Oracle, MSSql etc. will also work with MySql ODBC driver.
Antonio,
I use FWH 10.1
Harbour for BCC - 2.0
Regards
Wzaf
#include "Fivewin.ch"
#include "ado.ch"
FUNCTION MAIN()
local oCon, lOk
lOk:=.t.
if lOk
TRY
oCon:=TOleAuto():new("ADODB.Connection")
CATCH oErroraDo
ErrorCatch( oErrorAdo, "Error en OLE" )
END
TRY
oCon:connectionString := "Driver={MySQL ODBC 5.1 Driver};Server=EQUIPO;Port=3306;Database=test;User=root; Password=12345678;Option=3;"
oCon:open()
CATCH oErrorAdo
ErrorCatch( oErrorAdo,"Error en OPEN" )
return .f.
END
endif
return nil
Function ErrorCatch( oError, cTitle )
LOCAL cMensagemRetorno := ""
local cArg, cArgs := ""
if ValType( oError:Args ) == "A"
for each cArg in oError:Args
cArgs += cValToChar( cArg ) + CRLF
NEXT
endif
cMensagemRetorno := "[Subsystem]" + oError:SubSystem + CRLF +;
"[SubCode]" + alltrim( str( oError:SubCode ) ) + CRLF +;
"[Operacion]" + oError:Operation + CRLF +;
"[Descripcion]" + oError:Description + CRLF +;
"[Argumentos]" + cArgs
RETURN( msgStop( cMensagemRetorno, cTitle ) )Tank you Daniel ! ,
it works .
Best Regards
Wzaf