diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 4dbb484ee7..48efdc7c39 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -7,6 +7,11 @@ For example: 2002-12-01 13:30 UTC+0100 Foo Bar */ +2008-04-09 UTC+0100 Belgrano Massimo (mbelgrano/at/deltain.it) + *harbour/contrib/rddado/adordd.prg + *harbour/contrib/rddado/tests/test.prg + Support For Found() working after a LOCATE command + by Antonio Linares 2008-03-26 16:54 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rtl/gtos2/gtos2.c diff --git a/harbour/contrib/rddado/adordd.prg b/harbour/contrib/rddado/adordd.prg index a170bb7b69..17c3f1244a 100644 --- a/harbour/contrib/rddado/adordd.prg +++ b/harbour/contrib/rddado/adordd.prg @@ -84,7 +84,10 @@ #define WA_SCOPEINFO 13 #define WA_SQLSTRUCT 14 -#define WA_SIZE 14 +#define WA_FOUND 15 + +#define WA_SIZE 15 + ANNOUNCE ADORDD @@ -589,9 +592,12 @@ static function ADO_LOCATE( nWA, lContinue ) local oRecordSet := aWAData[ WA_RECORDSET ] oRecordSet:Find( aWAData[ WA_SCOPEINFO ][ UR_SI_CFOR ], If( lContinue, 1, 0 ) ) + aWAData[ WA_FOUND ] = ! oRecordSet:EOF + aWAData[ WA_EOF ] = oRecordSet:EOF return SUCCESS + static function ADO_CLEARREL( nWA ) local aWAData := USRRDD_AREADATA( nWA ) @@ -767,7 +773,8 @@ function ADORDD_GETFUNCTABLE( pFuncCount, pFuncTable, pSuperTable, nRddID ) aADOFunc[ UR_ORDDESTROY ] := ( @ADO_ORDDESTROY() ) aADOFunc[ UR_ORDLSTADD ] := ( @ADO_ORDLSTADD() ) aADOFunc[ UR_ORDLSTCLEAR ] := ( @ADO_ORDLSTCLEAR() ) - + aAdoFunc[ UR_FOUND ] := ( @ADO_FOUND() ) + return USRRDD_GETFUNCTABLE( pFuncCount, pFuncTable, pSuperTable, nRddID, cSuperRDD,; aADOFunc ) @@ -989,3 +996,11 @@ function HB_AdoRddGetRecordSet( nWA ) aWAData = USRRDD_AREADATA( nWA ) return If( aWAData != nil, aWAData[ WA_RECORDSET ], nil ) +static function ADO_FOUND( nWA, lFound ) + + local aWAData := USRRDD_AREADATA( nWA ) + + lFound = aWAData[ WA_FOUND ] + +return SUCCESS + diff --git a/harbour/contrib/rddado/tests/access2.prg b/harbour/contrib/rddado/tests/access2.prg index 235a31cb59..13f652b9b0 100644 --- a/harbour/contrib/rddado/tests/access2.prg +++ b/harbour/contrib/rddado/tests/access2.prg @@ -21,10 +21,14 @@ function Main() test2->First = "Lara" test2->Last = "Croft" test2->Age = 32 + GO TOP Browse() - + + GO TOP + locate for TEST2->First="Lara" + ? FOUND() USE return nil