2001-05-24 01:09 UTC-0800 Brian Hays <bhays@abacuslaw.com>

This commit is contained in:
Brian Hays
2001-05-24 07:58:32 +00:00
parent 59346e6bf8
commit 0b3f153594
4 changed files with 41 additions and 1 deletions

View File

@@ -1,3 +1,17 @@
2001-05-24 01:09 UTC-0800 Brian Hays <bhays@abacuslaw.com>
* source/rdd/dbcmd.c
* fixed dbSetIndex/ordListAdd to set the order and go top IF
it's the first bag
* contrib/rdd_ads/ads.ch
+ added #define ADS_LOCAL_SERVER, ADS_REMOTE_SERVER,
ADS_AIS_SERVER for "ORing" options
* fixed _SET_DELETED typo
* contrib/rdd_ads/ads1.c
* Fixed EOF flag when doing a GO 0
2001-05-23 21:15 UTC-0800 Ron Pinkas <ron@profit-master.com>
* include/hbclass.ch
! Corrected few minor typos.

View File

@@ -70,6 +70,11 @@
#command SET SERVER LOCAL => AdsSetServerType ( 1 )
#command SET SERVER REMOTE => AdsSetServerType ( 2 )
/* Server type constants for ORing with AdsSetServerType() */
#define ADS_LOCAL_SERVER 1
#define ADS_REMOTE_SERVER 2
#define ADS_AIS_SERVER 4
#command SET AXS LOCKING <x:ON,OFF> ;
=> AdsLocking( if( upper( <(x)> ) == "ON", .t., .f. ) )
@@ -86,7 +91,7 @@
=> Set( _SET_DELETED, <(x)> ) ;
;AdsSetDeleted( if( upper( <(x)> ) == "ON", .t., .f. ) )
#command SET DELETED (<x>) ;
=> Set( _SET_DELE, <x> ); AdsSetDeleted( <x> )
=> Set( _SET_DELETED, <x> ); AdsSetDeleted( <x> )
#command SET EPOCH TO <year> ;
=> Set( _SET_EPOCH, <year> ); AdsSetEpoch( <year> )

View File

@@ -425,6 +425,7 @@ static ERRCODE adsGoTo( ADSAREAP pArea, ULONG ulRecNo )
else /* GoTo Phantom record */
{
ulRecNo = 0;
AdsAtEOF( pArea->hTable, (UNSIGNED16 *)&(pArea->fEof) );
if ( !pArea->fEof )
ulRetVal = AdsGotoRecord( pArea->hTable, ulRecNo );
// don't do a GO 0 if already at EOF because we can't skip -1 off of it if you do

View File

@@ -2429,10 +2429,22 @@ HB_FUNC( ORDKEYNO )
HB_FUNC( ORDLISTADD )
{
DBORDERINFO pOrderInfo;
BOOL bFirst = FALSE;
if( s_pCurrArea )
{
/* determine if there are existing orders; if not, this becomes the controlling order
*/
pOrderInfo.itmResult = hb_itemPutNI( NULL, 0 );
SELF_ORDINFO( ( AREAP ) s_pCurrArea->pArea, DBOI_ORDERCOUNT, &pOrderInfo );
bFirst = ( pOrderInfo.itmResult->type & HB_IT_NUMERIC ) &&
hb_itemGetNI( &pOrderInfo.itmResult ) != 0;
hb_itemRelease( pOrderInfo.itmResult );
pOrderInfo.atomBagName = hb_param( 1, HB_IT_STRING );
pOrderInfo.itmOrder = hb_param( 2, HB_IT_STRING );
if( !pOrderInfo.atomBagName )
@@ -2441,9 +2453,17 @@ HB_FUNC( ORDLISTADD )
return;
}
SELF_ORDLSTADD( ( AREAP ) s_pCurrArea->pArea, &pOrderInfo );
if ( bFirst ) /* set as controlling order and go top */
{
pOrderInfo.itmOrder = hb_itemPutNI( NULL, 1 );
SELF_ORDLSTFOCUS( ( AREAP ) s_pCurrArea->pArea, &pOrderInfo );
hb_itemRelease( pOrderInfo.itmOrder );
SELF_GOTOP( ( AREAP ) s_pCurrArea->pArea );
}
}
else
hb_errRT_DBCMD( EG_NOTABLE, EDBCMD_NOTABLE, NULL, "ORDLISTADD" );
}
HB_FUNC( ORDLISTCLEAR )