From 921d276423d56bf6679bab7fbeb3bf6fd9c48346 Mon Sep 17 00:00:00 2001 From: Brian Hays Date: Mon, 25 Sep 2000 04:27:19 +0000 Subject: [PATCH] 2000-09-24 21:24 UTC+0800 Brian Hays --- harbour/ChangeLog | 5 +++++ harbour/contrib/rdd_ads/ads1.c | 13 ++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 2faadef3a7..a317fe1c0a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +2000-09-24 21:24 UTC+0800 Brian Hays + * contrib/rdd_ads/ads1.c + ! Fixed retrieval of logical fields + NOTICE!! before, logical fields returned incorrect values! + 2000-09-23 10:10 UTC+0800 Ron Pinkas * source/compiler/harbour.l * Removed TODO 4 Char abbreviation (done few weeks back). diff --git a/harbour/contrib/rdd_ads/ads1.c b/harbour/contrib/rdd_ads/ads1.c index e59417b2a7..97b67b3608 100644 --- a/harbour/contrib/rdd_ads/ads1.c +++ b/harbour/contrib/rdd_ads/ads1.c @@ -256,6 +256,7 @@ static ERRCODE adsGoTo( ADSAREAP pArea, ULONG ulRecNo ) pArea->fValidBuffer = FALSE; AdsGotoRecord( pArea->hTable, ulRecNo ); hb_adsCheckBofEof( pArea ); +HB_TRACE(HB_TR_ALWAYS, ("afterCheckBE: %lu %lu ", pArea->ulRecNo, ulRecNo )); return SUCCESS; } @@ -513,10 +514,10 @@ static ERRCODE adsGetValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) break; case HB_IT_LOGICAL: - hb_itemPutL( pItem, pArea->pRecord[ pArea->pFieldOffset[ uiIndex ] ] == 'T' || - pArea->pRecord[ pArea->pFieldOffset[ uiIndex ] ] == 't' || - pArea->pRecord[ pArea->pFieldOffset[ uiIndex ] ] == 'Y' || - pArea->pRecord[ pArea->pFieldOffset[ uiIndex ] ] == 'y' ); + hb_itemPutL( pItem, pArea->pRecord[ pArea->pFieldOffset[ uiIndex - 1 ] ] == 'T' || + pArea->pRecord[ pArea->pFieldOffset[ uiIndex - 1 ] ] == 't' || + pArea->pRecord[ pArea->pFieldOffset[ uiIndex - 1 ] ] == 'Y' || + pArea->pRecord[ pArea->pFieldOffset[ uiIndex - 1 ] ] == 'y' ); break; case HB_IT_MEMO: @@ -589,6 +590,7 @@ static ERRCODE adsPutValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) // AdsGetRecordNum( pArea->hTable, ADS_IGNOREFILTERS, // (UNSIGNED32 *)&(pArea->ulRecNo) ); hb_adsCheckBofEof( pArea ); +// xxx can't call this here-- it may skip!!! } if( uiIndex > pArea->uiFieldCount || pArea->fEof ) @@ -598,6 +600,7 @@ static ERRCODE adsPutValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) szText = pArea->pRecord + pArea->pFieldOffset[ uiIndex - 1 ]; bError = TRUE; AdsGetFieldName( pArea->hTable, uiIndex, szName, &pusBufLen ); + switch( pField->uiType ) { case HB_IT_STRING: @@ -1151,7 +1154,7 @@ static ERRCODE adsOrderCreate( ADSAREAP pArea, LPDBORDERCREATEINFO pOrderInfo ) } ulRetVal = AdsCreateIndex( pArea->hTable, pOrderInfo->abBagName, - pOrderInfo->atomBagName, (UCHAR*)hb_itemGetCPtr( pItem ), + pOrderInfo->atomBagName, (UCHAR*)hb_itemGetCPtr( pItem ), ( pArea->lpdbOrdCondInfo && pArea->lpdbOrdCondInfo->abFor )? (UCHAR*)pArea->lpdbOrdCondInfo->abFor:(UCHAR*)"", (UCHAR*)"", ulOptions, &phIndex); if ( ulRetVal != AE_SUCCESS )