Antonio,
With the version you just send me, there are some bugs so far:
At, ADOFINDREC(), oRecordSet:AbsolutePosition := IF( oRS:AbsolutePosition == adPosEOF, oRS:RecordCount() + 1, oRS:AbsolutePosition ) is failing, as IF( oRS:AbsolutePosition == adPosEOF, oRS:RecordCount() + 1, oRS:AbsolutePosition ) its giving -1, which is not possible.
HBRECNO is not created by default. Also, the code at ADO_OPEN is not being proccessed to add it.
I suggested to simple add it to ADOCREATE(), which is the easiest way as explained before.
Also, to help debugging, please at AdoShowError, add procname(2) to 7:
- Code: Select all Expand view
FUNCTION ADOSHOWERROR( oCn, lSilent )
LOCAL nErr, oErr, cErr
DEFAULT oCn TO oConnection
DEFAULT lSilent TO .F.
IF ( nErr := oCn:Errors:Count ) > 0
oErr := oCn:Errors( nErr - 1 )
IF ! lSilent
WITH OBJECT oErr
cErr := oErr:Description
cErr += CRLF + 'Source : ' + oErr:Source
cErr += CRLF + 'NativeError : ' + cValToChar( oErr:NativeError )
cErr += CRLF + 'Error Source : ' + oErr:Source
cErr += CRLF + 'Sql State : ' + oErr:SQLState
cErr += CRLF + REPLICATE( '-', 50 )
cErr += CRLF + PROCNAME( 1 ) + "( " + cValToChar( PROCLINE( 1 ) ) + " )"
cErr += CRLF + PROCNAME( 2 ) + "( " + cValToChar( PROCLINE( 2 ) ) + " )"
cErr += CRLF + PROCNAME( 3 ) + "( " + cValToChar( PROCLINE( 3 ) ) + " )"
cErr += CRLF + PROCNAME( 4 ) + "( " + cValToChar( PROCLINE( 4 ) ) + " )"
cErr += CRLF + PROCNAME( 5 ) + "( " + cValToChar( PROCLINE( 5 ) ) + " )"
cErr += CRLF + PROCNAME( 6 ) + "( " + cValToChar( PROCLINE( 6 ) ) + " )"
cErr += CRLF + PROCNAME( 7 ) + "( " + cValToChar( PROCLINE( 7 ) ) + " )"
Muchas gracias. Many thanks.
Un saludo, Best regards,
Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]
Implementando MSVC 2010, FWH64 y ADO.
Abandonando uso xHarbour y SQLRDD.