diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 87c3162125..5357ff46f7 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -7,6 +7,9 @@ For example: 2002-12-01 23:12 UTC+0100 Foo Bar */ + * source/rdd/dbf1.c + * Msvc compiler need tmp to be unsigned char * at line 1605/1607 + 2002-05-07 22:25 UTC-0300 Luiz Rafael Culik * contrib/rdd_ads/ads1.c ! fixed problem on Seeking Dates with RDDADS diff --git a/harbour/contrib/rdd_ads/ads1.c b/harbour/contrib/rdd_ads/ads1.c index d513cb1dac..f5e2dd8c8f 100644 --- a/harbour/contrib/rdd_ads/ads1.c +++ b/harbour/contrib/rdd_ads/ads1.c @@ -535,7 +535,14 @@ static ERRCODE adsSeek( ADSAREAP pArea, BOOL bSoftSeek, PHB_ITEM pKey, BOOL bFin AdsSeekLast( pArea->hOrdCurrent, (UNSIGNED8 *) &dTemp, 8, ADS_DOUBLEKEY, (UNSIGNED16*) &(pArea->fFound) ); } - else + else if(hb_itemType( pKey ) & HB_IT_DATE ) + { + char szData[9]; + hb_itemGetDS( pKey, (char *) szData ); + AdsSeekLast( pArea->hOrdCurrent, szData, + 8, ADS_STRINGKEY, + (UNSIGNED16*) &(pArea->fFound) ); + }else { hb_itemGetNLen( pKey, &uiLen, &uiDec ); hb_ndtoa( hb_itemGetND( pKey ), ( char * ) szText, uiLen, uiDec ); @@ -556,6 +563,14 @@ static ERRCODE adsSeek( ADSAREAP pArea, BOOL bSoftSeek, PHB_ITEM pKey, BOOL bFin AdsSeek( pArea->hOrdCurrent, (UNSIGNED8 *) &dTemp, 8, ADS_DOUBLEKEY, usSeekType, (UNSIGNED16*) &(pArea->fFound) ); } + else if(hb_itemType( pKey ) & HB_IT_DATE ) + { + char szData[9]; + hb_itemGetDS( pKey, (char *) szData ); + AdsSeek( pArea->hOrdCurrent, szData, + 8, ADS_STRINGKEY, usSeekType, (UNSIGNED16*) &(pArea->fFound) ); + } + /* UNSIGNED8 aucKey[ADS_MAX_KEY_LENGTH]; UNSIGNED16 usLength;