diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b76d26beeb..e52e5d50e6 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,23 @@ +2000-11-13 16:18 UTC+0800 Brian Hays + * contrib/rdd_ads/ads1.c + + adsOrderInfo: added support for most options + + include/ord.ch + + 5.3-level SCOPE Commands and DBOI_* constants + * include/hbapirdd.h + + added note that DBOI_* constants are also in ord.ch + * source/rdd/dbcmd.c + * dbOrderInfo tweaks + * include/hbrddwrk.h + * removed stub for hb_waOrderInfo + * source/rdd/workarea.c + * added default hb_waOrderInfo + Currently this throws an error if a non-supported flag is passed + NOTE !!! --> + Clipper behavior was just to return NIL, but that usually creates + harder to trap errors down the road. + I will revert this to return NIL later after testing if the group desires + + 2000-11-13 20:25 UTC+0100 Ryszard Glab *include/hbexpra.c @@ -16,10 +36,10 @@ *contrib/rdd_ads/ads1.c *added typedef for setScope member of virtual table typedef USHORT ( * DBENTRYP_VOS )( AREAP area, LPDBORDSCOPEINFO param ); - + *source/rdd/rddcpy.c * replaced NULL with 0 - + *source/vm/asort.c *source/vm/classes.c *source/vm/hvm.c diff --git a/harbour/contrib/rdd_ads/ads1.c b/harbour/contrib/rdd_ads/ads1.c index 2337911f09..5e65dec2e6 100644 --- a/harbour/contrib/rdd_ads/ads1.c +++ b/harbour/contrib/rdd_ads/ads1.c @@ -47,7 +47,9 @@ #include "rddads.h" #include -static ERRCODE adsRecCount( ADSAREAP pArea, ULONG * pRecCount ); +static ERRCODE adsRecCount( ADSAREAP pArea, ULONG * pRecCount ); +static ERRCODE adsScopeInfo( ADSAREAP pArea, USHORT nScope, PHB_ITEM pItem ); +static ERRCODE adsSetScope( ADSAREAP pArea, LPDBORDSCOPEINFO sInfo ); HB_FUNC( _ADS ); HB_FUNC( ADS_GETFUNCTABLE ); @@ -1398,7 +1400,9 @@ static ERRCODE adsOrderInfo( ADSAREAP pArea, USHORT uiIndex, LPDBORDERINFO pOrde ADSHANDLE phIndex; UNSIGNED32 ulRetVal = AE_SUCCESS; UNSIGNED8 aucBuffer[MAX_STR_LEN + 1]; - UNSIGNED16 pusLen = MAX_STR_LEN; + UNSIGNED16 pusLen = MAX_STR_LEN; + UNSIGNED16 pus16 = 0; + UNSIGNED32 pul32 = 0; HB_TRACE(HB_TR_DEBUG, ("adsOrderInfo(%p, %hu, %p)", pArea, uiIndex, pOrderInfo)); @@ -1418,62 +1422,88 @@ static ERRCODE adsOrderInfo( ADSAREAP pArea, USHORT uiIndex, LPDBORDERINFO pOrde switch( uiIndex ) { - case DBOI_BAGEXT: - hb_itemPutC( pOrderInfo->itmResult, - ((adsFileType==ADS_ADT) ? ".adi" : (adsFileType==ADS_CDX) ? ".cdx" : ".ntx") ); + case DBOI_CONDITION: + AdsGetIndexCondition( phIndex, aucBuffer, &pusLen); + hb_itemPutCL( pOrderInfo->itmResult, (char*)aucBuffer, pusLen ); break; - case DBOI_ORDERCOUNT: - pusLen = 0; - if( pOrderInfo->atomBagName && (UNSIGNED8*) hb_itemGetCPtr( pOrderInfo->atomBagName )) - { - /* if already open, ads fills other info OK. - TODO: verify it is already open, or be sure to close it! - */ - AdsOpenIndex (pArea->hTable, - (UNSIGNED8*) hb_itemGetCPtr( pOrderInfo->atomBagName ), NULL, &pusLen); - - }else /* no specific bag requested; get all current indexes */ - { - AdsGetNumIndexes(pArea->hTable, &pusLen); - } - hb_itemPutNI(pOrderInfo->itmResult, pusLen); - break; - case DBOI_CUSTOM : - pusLen = 0; - AdsIsIndexCustom (phIndex, &pusLen); - hb_itemPutL(pOrderInfo->itmResult, pusLen); - break; - case DBOI_KEYCOUNT : - { - UNSIGNED32 pulKey ; - AdsGetRecordCount( (phIndex ? phIndex : pArea->hTable), ADS_RESPECTSCOPES/*usFilterOption*/, &pulKey); - hb_itemPutNL(pOrderInfo->itmResult, pulKey); - break; - } - case DBOI_KEYCOUNTRAW : /* ignore filter or scope */ - { - UNSIGNED32 pulKey ; - AdsGetRecordCount( (phIndex ? phIndex : pArea->hTable), ADS_IGNOREFILTERS/*usFilterOption*/, &pulKey); - hb_itemPutNL(pOrderInfo->itmResult, pulKey); - break; - } case DBOI_EXPRESSION: AdsGetIndexExpr( phIndex, aucBuffer, &pusLen); - hb_itemPutC( pOrderInfo->itmResult, (char*)aucBuffer ); + hb_itemPutCL( pOrderInfo->itmResult, (char*)aucBuffer, pusLen ); break; - case DBOI_CONDITION: + + case DBOI_ISCOND: AdsGetIndexCondition( phIndex, aucBuffer, &pusLen); - hb_itemPutC( pOrderInfo->itmResult, (char*)aucBuffer ); + hb_itemPutL( pOrderInfo->itmResult, pusLen ); break; + + case DBOI_ISDESC: + AdsIsIndexDescending (phIndex, &pus16); + hb_itemPutL( pOrderInfo->itmResult, pus16 ); + break; + + case DBOI_UNIQUE: + AdsIsIndexUnique (phIndex, &pus16); + hb_itemPutL( pOrderInfo->itmResult, pus16 ); + break; + + case DBOI_KEYTYPE: + AdsGetKeyType(phIndex, &pus16); + switch( pus16 ) + { + case ADS_STRING: + hb_itemPutC( pOrderInfo->itmResult, "C" ); + break; + case ADS_NUMERIC: + hb_itemPutC( pOrderInfo->itmResult, "N" ); + break; + case ADS_DATE: + hb_itemPutC( pOrderInfo->itmResult, "D" ); + break; + case ADS_LOGICAL: + hb_itemPutC( pOrderInfo->itmResult, "L" ); + break; + case ADS_RAW: + default: + hb_itemPutC( pOrderInfo->itmResult, "" ); + } + break; + + case DBOI_KEYSIZE: + AdsGetKeyLength(phIndex, &pus16); + hb_itemPutNL(pOrderInfo->itmResult, pus16); + break; + + case DBOI_KEYVAL: + AdsExtractKey( phIndex, aucBuffer, &pusLen); + hb_itemPutCL( pOrderInfo->itmResult, (char*)aucBuffer, pusLen); + break; + + case DBOI_POSITION : + if( phIndex ) + AdsGetKeyNum ( phIndex, ADS_RESPECTFILTERS, &pul32); + else + AdsGetRecordNum ( pArea->hTable, ADS_RESPECTFILTERS, &pul32); + /* + TODO: This count will be wrong if server doesn't know full filter! + */ + hb_itemPutNL(pOrderInfo->itmResult, pul32); + break; + + case DBOI_RECNO : /* TODO: OR IS THIS JUST RECNO?? */ + case DBOI_KEYNORAW : + if( phIndex ) + AdsGetKeyNum ( phIndex, ADS_IGNOREFILTERS, &pul32); + else + AdsGetRecordNum ( pArea->hTable, ADS_IGNOREFILTERS, &pul32); + hb_itemPutNL(pOrderInfo->itmResult, pul32); + break; + case DBOI_NAME: AdsGetIndexName( phIndex, aucBuffer, &pusLen); - hb_itemPutC( pOrderInfo->itmResult, (char*)aucBuffer ); - break; - case DBOI_BAGNAME: - AdsGetIndexFilename ( phIndex,ADS_BASENAME , aucBuffer, &pusLen); - hb_itemPutC( pOrderInfo->itmResult, (char*)aucBuffer ); + hb_itemPutCL( pOrderInfo->itmResult, (char*)aucBuffer, pusLen); break; + case DBOI_NUMBER : { UNSIGNED16 usOrder = 0; @@ -1484,19 +1514,114 @@ static ERRCODE adsOrderInfo( ADSAREAP pArea, USHORT uiIndex, LPDBORDERINFO pOrde hb_itemPutNI(pOrderInfo->itmResult, usOrder); break; } - case DBOI_POSITION : - { - UNSIGNED32 pulKey ; - if( phIndex ) - AdsGetKeyNum ( phIndex, ADS_RESPECTSCOPES, &pulKey); - else - AdsGetRecordNum ( pArea->hTable, ADS_IGNOREFILTERS, &pulKey); - hb_itemPutNL(pOrderInfo->itmResult, pulKey); + + case DBOI_BAGNAME: + AdsGetIndexFilename ( phIndex,ADS_BASENAME , aucBuffer, &pusLen); + hb_itemPutCL( pOrderInfo->itmResult, (char*)aucBuffer, pusLen ); break; - } + + case DBOI_BAGEXT: + hb_itemPutC( pOrderInfo->itmResult, + ((adsFileType==ADS_ADT) ? ".adi" : (adsFileType==ADS_CDX) ? ".cdx" : ".ntx") ); + break; + + case DBOI_ORDERCOUNT: + if( pOrderInfo->atomBagName && (UNSIGNED8*) hb_itemGetCPtr( pOrderInfo->atomBagName )) + { + /* if already open, ads fills other info OK. + TODO: verify it is already open, or be sure to close it! + */ + AdsOpenIndex (pArea->hTable, + (UNSIGNED8*) hb_itemGetCPtr( pOrderInfo->atomBagName ), NULL, &pus16); + + }else /* no specific bag requested; get all current indexes */ + { + AdsGetNumIndexes(pArea->hTable, &pus16); + } + hb_itemPutNI(pOrderInfo->itmResult, pus16); + break; + + case DBOI_KEYCOUNT : + AdsGetRecordCount( (phIndex ? phIndex : pArea->hTable), ADS_RESPECTFILTERS, &pul32); + /* + TODO: This count will be wrong if server doesn't know full filter! + */ + hb_itemPutNL(pOrderInfo->itmResult, pul32); + break; + + case DBOI_KEYCOUNTRAW : /* ignore filter or scope */ + AdsGetRecordCount( (phIndex ? phIndex : pArea->hTable), ADS_IGNOREFILTERS, &pul32); + hb_itemPutNL(pOrderInfo->itmResult, pul32); + break; + + case DBOI_SCOPETOP : + hb_itemPutC( pOrderInfo->itmResult, "" ); + adsScopeInfo( pArea, 0, pOrderInfo->itmResult ); + break; + + case DBOI_SCOPEBOTTOM : + hb_itemPutC( pOrderInfo->itmResult, "" ); + adsScopeInfo( pArea, 1, pOrderInfo->itmResult ) ; + break; + + case DBOI_SCOPETOPCLEAR : + hb_itemPutC( pOrderInfo->itmResult, "" ); + adsScopeInfo( pArea, 0, pOrderInfo->itmResult ) ; + AdsClearScope( phIndex, (UNSIGNED16) 1); /* ADS scopes are 1/2 instead of 0/1 */ + break; + + case DBOI_SCOPEBOTTOMCLEAR : + hb_itemPutC( pOrderInfo->itmResult, "" ); + adsScopeInfo( pArea, 1, pOrderInfo->itmResult ) ; + AdsClearScope( phIndex, (UNSIGNED16) 2); + break; + + case DBOI_CUSTOM : + AdsIsIndexCustom (phIndex, &pus16); + hb_itemPutL(pOrderInfo->itmResult, pus16); + break; + + case DBOI_OPTLEVEL : + AdsGetAOFOptLevel( pArea->hTable, &pus16, NULL, NULL ); + switch( pus16 ) + { + case ADS_OPTIMIZED_FULL: + hb_itemPutNI(pOrderInfo->itmResult, 2); + break; + case ADS_OPTIMIZED_PART: + hb_itemPutNI(pOrderInfo->itmResult, 1); + break; + default: + hb_itemPutNI(pOrderInfo->itmResult, 0); + } + break; + +/* Unsupported: + +DBOI_FILEHANDLE +DBOI_FULLPATH +DBOI_SETCODEBLOCK +DBOI_KEYDEC +DBOI_HPLOCKING +DBOI_LOCKOFFSET +DBOI_KEYADD +DBOI_KEYDELETE +DBOI_KEYSINCLUDED +DBOI_SKIPUNIQUE +DBOI_STRICTREAD +DBOI_OPTIMIZE +DBOI_AUTOORDER +DBOI_AUTOSHARE + +*/ + + case DBOI_AUTOOPEN : + hb_itemPutL( pOrderInfo->itmResult, TRUE ); + /* TODO: throw some kind of error if caller tries to set to False */ + break; + default: - // TODO: This should call SUPER for default handling, but it never gets there - //SUPER_ORDINFO( ( AREAP ) pArea, uiIndex, pOrderInfo ); + SUPER_ORDINFO( ( AREAP ) pArea, uiIndex, pOrderInfo ); break; } return SUCCESS; @@ -1525,10 +1650,10 @@ static ERRCODE adsScopeInfo( ADSAREAP pArea, USHORT nScope, PHB_ITEM pItem ) if( pArea->hOrdCurrent ) { - ulRetVal = AdsGetScope( pArea->hOrdCurrent, (UNSIGNED16) nScope, pucScope, &pusBufLen ); - if ( ulRetVal != AE_SUCCESS ) - return FAILURE; - hb_itemPutCL( pItem, ( char * ) pucScope, pusBufLen ); + /*ADS top/bottom are 1,2 instead of 0,1*/ + ulRetVal = AdsGetScope( pArea->hOrdCurrent, (UNSIGNED16) nScope + 1, pucScope, &pusBufLen ); + if ( ulRetVal == AE_SUCCESS ) + hb_itemPutCL( pItem, ( char * ) pucScope, pusBufLen ); } return SUCCESS; } @@ -1538,7 +1663,7 @@ static ERRCODE adsSetFilter( ADSAREAP pArea, LPDBFILTERINFO pFilterInfo ) BOOL bValidExpr = FALSE; HB_TRACE(HB_TR_DEBUG, ("adsSetFilter(%p, %p)", pArea, pFilterInfo)); - /* ----------------- BH ------------------ + /* ----------------- NOTE: ------------------ See if the server can evaluate the filter. If not, don't pass it to the server; let the super level filter the records locally. @@ -1561,12 +1686,12 @@ static ERRCODE adsSetScope( ADSAREAP pArea, LPDBORDSCOPEINFO sInfo ) { if( sInfo->scopeValue ) { - AdsSetScope( pArea->hOrdCurrent, (UNSIGNED16) (sInfo->nScope + 1), /*ADS top/bottom are 1,2 instead of 0,1*/ + AdsSetScope( pArea->hOrdCurrent, (UNSIGNED16) (sInfo->nScope) + 1, /*ADS top/bottom are 1,2 instead of 0,1*/ (UNSIGNED8*) sInfo->scopeValue, (UNSIGNED16) strlen( (const char *)sInfo->scopeValue), ADS_STRINGKEY ); } else - AdsClearScope( pArea->hOrdCurrent, (UNSIGNED16) sInfo->nScope ); + AdsClearScope( pArea->hOrdCurrent, (UNSIGNED16) sInfo->nScope + 1 ); return SUCCESS; } diff --git a/harbour/include/hbapirdd.h b/harbour/include/hbapirdd.h index c5024bbb70..fe5be9aed9 100644 --- a/harbour/include/hbapirdd.h +++ b/harbour/include/hbapirdd.h @@ -37,6 +37,7 @@ #define HB_APIRDD_H_ #include "hbapifs.h" +//#include "ord.ch" #if defined(HB_EXTERN_C) extern "C" { @@ -98,8 +99,9 @@ extern void hb_rddShutDown( void ); #define DBLM_FILE 3 - -/* Codes for SELF_ORDINFO() */ +/* Constants for SELF_ORDINFO() + Be sure these stay in sync with the same ones in ord.ch + */ #define DBOI_CONDITION 1 /* Get the order condition */ #define DBOI_EXPRESSION 2 /* Get the order expression */ diff --git a/harbour/include/hbrddwrk.h b/harbour/include/hbrddwrk.h index ef388425d9..7ea7bcf078 100644 --- a/harbour/include/hbrddwrk.h +++ b/harbour/include/hbrddwrk.h @@ -113,7 +113,8 @@ extern ERRCODE hb_waSetRel( AREAP pArea, LPDBRELINFO pRelInfo ); extern ERRCODE hb_waOrderCondition( AREAP pArea, LPDBORDERCONDINFO param ); #define hb_waOrderCreate ( DBENTRYP_VOC ) hb_waUnsupported #define hb_waOrderDestroy ( DBENTRYP_OI ) hb_waUnsupported -#define hb_waOrderInfo ( DBENTRYP_OII ) hb_waNull +//#define hb_waOrderInfo ( DBENTRYP_OII ) hb_waNull +extern ERRCODE hb_waOrderInfo( AREAP pArea, USHORT index, LPDBORDERINFO param ); extern ERRCODE hb_waClearFilter( AREAP pArea ); extern ERRCODE hb_waClearLocate( AREAP pArea ); #define hb_waClearScope hb_waUnsupported diff --git a/harbour/include/ord.ch b/harbour/include/ord.ch new file mode 100644 index 0000000000..5041fd5356 --- /dev/null +++ b/harbour/include/ord.ch @@ -0,0 +1,121 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * Header file for the RDD API Index Order support + * + * Copyright 2000 {list of individual authors and e-mail addresses} + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version, with one exception: + * + * The exception is that if you link the Harbour Runtime Library (HRL) + * and/or the Harbour Virtual Machine (HVM) with other files to produce + * an executable, this does not by itself cause the resulting executable + * to be covered by the GNU General Public License. Your use of that + * executable is in no way restricted on account of linking the HRL + * and/or HVM code into it. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit + * their web site at http://www.gnu.org/). + * + */ + + +#ifndef HB_ORD_H_ +#define HB_ORD_H_ + +#define TOPSCOPE 0 +#define BOTTOMSCOPE 1 + + +/* SCOPE commands: */ + +#command SET SCOPETOP TO => OrdScope( 0, nil ) +#command SET SCOPETOP TO => OrdScope( 0, ) + +#command SET SCOPEBOTTOM TO => OrdScope( 1, nil ) +#command SET SCOPEBOTTOM TO => OrdScope( 1, ) + +#command SET SCOPE TO => OrdScope( 0, ); + ; OrdScope( 1, ) + +#command SET SCOPE TO , => OrdScope( 0, ); + ; OrdScope( 1, ) + +#command SET SCOPE TO => OrdScope( 0, ); + ; OrdScope( 1, ) + +#command SET SCOPE TO , => OrdScope( 1, ) + + +/* + Constants for SELF_ORDINFO () + Be sure these stay in sync with the same ones in hbapirdd.h +*/ + +#define DBOI_CONDITION 1 /* Get the order's condition */ +#define DBOI_EXPRESSION 2 /* Get the order's expression */ +#define DBOI_POSITION 3 /* Get current key position in scope and filter */ +#define DBOI_RECNO 4 /* Get current key position disregarding filters */ +#define DBOI_NAME 5 /* Get the order's name */ +#define DBOI_NUMBER 6 /* Get the order's list position */ +#define DBOI_BAGNAME 7 /* Get the order's Bag name */ +#define DBOI_BAGEXT 8 /* Get the order's Bag Extension */ +#define DBOI_INDEXEXT DBOI_BAGEXT +#define DBOI_INDEXNAME DBOI_BAGNAME +#define DBOI_ORDERCOUNT 9 /* Get the count of ORDERS in an index file or in total */ +#define DBOI_FILEHANDLE 10 /* Get the handle of the index file */ +#define DBOI_ISCOND 11 /* Does the order have a FOR condition */ +#define DBOI_ISDESC 12 /* Is the order DESCENDing */ +#define DBOI_UNIQUE 13 /* Does the order have the unique attribute set? */ + +/* 53-level constants */ +#define DBOI_FULLPATH 20 /* Get the order Bag's Full Path */ +#define DBOI_KEYTYPE 24 /* Get the type of the order's key */ +#define DBOI_KEYSIZE 25 /* Get the size of the order's key */ +#define DBOI_KEYCOUNT 26 /* Get the count of keys in scope and filter*/ +#define DBOI_SETCODEBLOCK 27 /* Set codeblock for order key */ +#define DBOI_KEYDEC 28 /* Get # of decimals in order's key */ +#define DBOI_HPLOCKING 29 /* Using High performance index locking? */ +#define DBOI_LOCKOFFSET 35 /* New locking offset */ + +#define DBOI_KEYADD 36 /* Gets/Sets the Key to be added */ +#define DBOI_KEYDELETE 37 /* Gets/Sets the Key to be deleted */ +#define DBOI_KEYVAL 38 /* Get current key's value */ +#define DBOI_SCOPETOP 39 /* Gets/Sets the scope top */ +#define DBOI_SCOPEBOTTOM 40 /* Gets/Sets the scope bottom */ +#define DBOI_SCOPETOPCLEAR 41 /* Clear the top scope setting */ +#define DBOI_SCOPEBOTTOMCLEAR 42 /* Clear the bottom scope setting */ + +#define DBOI_CUSTOM 45 /* Custom created order */ +#define DBOI_SKIPUNIQUE 46 /* Flag for skip unique */ + +#define DBOI_KEYSINCLUDED 50 /* # of keys included while indexing */ +/* keyno */ +#define DBOI_KEYGOTO DBOI_POSITION +#define DBOI_KEYNORAW 51 /* keyno ignoring any filter */ +#define DBOI_KEYCOUNTRAW 52 /* keycount ignoring any filter */ +#define DBOI_OPTLEVEL 53 /* Optimization achieved for last query */ + +// Ideally should be an entry point that doesn't require an open table +#define DBOI_STRICTREAD 60 /* Get/set read thru RDD when indexing */ +#define DBOI_OPTIMIZE 61 /* Get/set use of query optimization */ +#define DBOI_AUTOOPEN 62 /* Get/set auto open of production index */ +#define DBOI_AUTOORDER 63 /* Get/set default order: production index */ +#define DBOI_AUTOSHARE 64 /* Get/set automatic sharing control */ + +#endif + diff --git a/harbour/source/rdd/dbcmd.c b/harbour/source/rdd/dbcmd.c index c0b2b07bf6..b5a188162a 100644 --- a/harbour/source/rdd/dbcmd.c +++ b/harbour/source/rdd/dbcmd.c @@ -2744,15 +2744,21 @@ HB_FUNC( ORDSCOPE ) } sInfo.nScope = hb_parni( 1 ); pScopeValue = hb_itemPutC( NULL, "" ); + SELF_SCOPEINFO( ( AREAP ) s_pCurrArea->pArea, sInfo.nScope, pScopeValue ); hb_retc( hb_itemGetCPtr( pScopeValue ) ); hb_itemRelease( pScopeValue ); if( hb_pcount() > 1 ) - sInfo.scopeValue = (BYTE*) hb_parc( 2 ); - else + { + if ( ISNIL( 2 ) ) /* explicitly passed NIL, clear it */ + sInfo.scopeValue = NULL; + else + sInfo.scopeValue = (BYTE*) hb_parc( 2 ); + + SELF_SETSCOPE( ( AREAP ) s_pCurrArea->pArea, (LPDBORDSCOPEINFO) &sInfo ); + }else sInfo.scopeValue = NULL; - SELF_SETSCOPE( ( AREAP ) s_pCurrArea->pArea, (LPDBORDSCOPEINFO) &sInfo ); } else hb_errRT_DBCMD( EG_NOTABLE, EDBCMD_NOTABLE, NULL, "ORDSCOPE" ); diff --git a/harbour/source/rdd/workarea.c b/harbour/source/rdd/workarea.c index 9acb72260d..1aeaae5c95 100644 --- a/harbour/source/rdd/workarea.c +++ b/harbour/source/rdd/workarea.c @@ -461,20 +461,20 @@ ERRCODE hb_waInfo( AREAP pArea, USHORT uiIndex, PHB_ITEM pItem ) } /* - * Retrieve information about the current order. + * Retrieve information about the current order that SELF could not. * Called by SELF_ORDINFO if uiIndex is not supported. */ #ifdef HB_COMPAT_C53 -//ERRCODE hb_waorderInfo( AREAP pArea, USHORT index, LPDBORDERINFO param ) -//{ -// HB_TRACE(HB_TR_DEBUG, ("hb_waOrderInfo(%p, %hu, %p)", pArea, index, param)); -// HB_SYMBOL_UNUSED( pArea ); +ERRCODE hb_waOrderInfo( AREAP pArea, USHORT index, LPDBORDERINFO param ) +{ + HB_TRACE(HB_TR_DEBUG, ("hb_waOrderInfo(%p, %hu, %p)", pArea, index, param)); + HB_SYMBOL_UNUSED( pArea ); -// if ( param->itmResult ) -// hb_itemRelease( param->itmResult ); -// hb_errRT_DBCMD( EG_ARG, EDBCMD_BADPARAMETER, NULL, "ORDERINFO" ); -// return FAILURE; -//} + if ( param->itmResult ) + hb_itemRelease( param->itmResult ); + hb_errRT_DBCMD( EG_ARG, EDBCMD_BADPARAMETER, NULL, "ORDERINFO" ); + return FAILURE; +} #endif /*