diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 4b9b74a8d1..02f13d6c1a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,9 @@ +20000405-10:00 GMT+3 Alexander Kresin + * contrib/rdd_ads/ads1.c + * added adsFlush() function + * contrib/rdd_ads/adsfunc.c + * Added adsGetRelKeyPos() function + 20000405-02:03 GMT+1 Victor Szakats * source/rtl/math.c diff --git a/harbour/contrib/rdd_ads/ads1.c b/harbour/contrib/rdd_ads/ads1.c index 1ac2e7e274..8efaa6e879 100644 --- a/harbour/contrib/rdd_ads/ads1.c +++ b/harbour/contrib/rdd_ads/ads1.c @@ -401,7 +401,13 @@ static ERRCODE adsFieldName( ADSAREAP pArea, USHORT uiIndex, void * szName ) return SUCCESS; } -#define adsFlush NULL +static ERRCODE adsFlush( ADSAREAP pArea ) +{ + HB_SYMBOL_UNUSED( pArea ); + HB_TRACE(HB_TR_DEBUG, ("adsFlush(%p)", pArea )); + AdsWriteAllRecords(); + return SUCCESS; +} static ERRCODE adsGetRec( ADSAREAP pArea, BYTE ** pBuffer ) { @@ -1265,7 +1271,7 @@ static RDDFUNCS adsTable = { adsBof, adsFieldDisplay, adsFieldInfo, ( DBENTRYP_SVP ) adsFieldName, - adsFlush, + ( DBENTRYP_V ) adsFlush, ( DBENTRYP_PP ) adsGetRec, ( DBENTRYP_SI ) adsGetValue, ( DBENTRYP_SVL ) adsGetVarLen, diff --git a/harbour/contrib/rdd_ads/adsfunc.c b/harbour/contrib/rdd_ads/adsfunc.c index e1b2f0dd5e..5c6a8e7504 100644 --- a/harbour/contrib/rdd_ads/adsfunc.c +++ b/harbour/contrib/rdd_ads/adsfunc.c @@ -425,3 +425,17 @@ HB_FUNC( ADSSETAOF ) } +HB_FUNC( ADSGETRELKEYPOS ) +{ + ADSAREAP pArea; + DOUBLE pdPos; + + pArea = (ADSAREAP) hb_rddGetCurrentWorkAreaPointer(); + if( pArea && pArea->hOrdCurrent ) + { + AdsGetRelKeyPos ( pArea->hOrdCurrent, &pdPos); + hb_retnd( pdPos ); + } + else + hb_errRT_DBCMD( EG_NOTABLE, 2001, NULL, "ADSREFRESHAOF" ); +} \ No newline at end of file