2002-12-17 10:50 UTC-0800 Brian Hays <bhays@abacuslaw.com>

This commit is contained in:
Brian Hays
2002-12-17 18:52:56 +00:00
parent 69cc69a9b4
commit a500cb7e89
6 changed files with 630 additions and 44 deletions

View File

@@ -8,6 +8,70 @@
2002-12-01 23:12 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2002-12-17 10:50 UTC-0800 Brian Hays <bhays@abacuslaw.com>
* contrib/rdd_ads/ads.ch
- Removed commands for SET PATH, DEFAULT, DELETED, EXACT,
DATEFORMAT and EPOCH since these are handled by the
Set Listener functionality now.
+ added new #define ADS_REQUIRE_VERSION6 to control version 6
ace32.lib/linker requirements
* contrib/rdd_ads/ads1.c
* created Set Listener support for
HB_SET_DATEFORMAT
HB_SET_DEFAULT
HB_SET_DELETED
HB_SET_EPOCH
HB_SET_EXACT
HB_SET_PATH
So whenever you call the Set() function or commands,
ADS is automatically updated.
* added these fixes by Luiz Culik:
* Created bDictionary and adsConnectHandle to allow access
to ads data dictionaries;
* store pFieldInfo.uiDec = uiDec for doubles in adsCreateFields.
* fixed initialization of dVal in adsGetValue
(fix by Ron Christie)
* fixed Trace in ADS_GETFUNCTABLE(%i, %p), *uiCount, pTable));
to show the contents of uiCount instead of the pointer address.
* contrib/rdd_ads/adsfunc.c
* to test SetListener capabilities, added or upgraded
these functions to be classic "Set/Get" functions so
they return the prior ads setting:
AdsSetDeleted
AdsSetDefault
AdsSetSearchPath
AdsSetExact
NOTE! Because the Set() function now also controls
ADS, there is no reason for normal code to ever call
these functions. If you do, you may get ADS out of sync
with Harbour's settings and create unpredictable results.
+ added these funcs by Luiz Culik:
AdsAddTable()
AdsAddUser To Group()
AdsUseDictionary()
These are all protected by ADS_REQUIRE_VERSION6, so to use them
you must define it when compiling rddads.
The data dictionary support is a work-in-progress and may need
to be re-thought, so don't get too dependent upon current
implementation.
* contrib/rdd_ads/doc/en/adsfuncs.txt
+ added documentation for functions in adsfunc.c
* contrib/rdd_ads/doc/en/readme.txt
+ added explanation for using the Set() function call
as well as the equivalent commands for SET DEFAULT TO,
DATEFORMAT, DELETE, EXACT and EPOCH.
+ added explanation of INDEXING and Progress Displays using
AdsRegCallBack() (and why EVAL/EVERY cannot be supported.)
2002-12-17 12:40 UTC-0300 Walter Negro <anegro@overnet.com.ar>
* source/tget.prg
! Fix, UpdateBuffer() should not actualize the variable if the value
@@ -53,7 +117,7 @@
2002-11-26 21:20 UTC+0100 Tomaz Zupan <tomaz.zupan@orpo.si>
* contrib/odbc/browodbc.prg
! There was a bug in skipping, that threw an error when
! There was a bug in skipping, that threw an error when
dataset contained 0 rows
2002-11-25 21:45 UTC-0300 Luiz Rafael Culik <culikr@uol.com.br>
@@ -98,7 +162,7 @@
2002-11-18 22:35 UTC+0300 Alexander Kresin <alex@belacy.belgorod.su>
* source/rdd/dbcmd.c
! COPY TO ... FIELDS ... is fixed - fields in the result dbf are in the
! COPY TO ... FIELDS ... is fixed - fields in the result dbf are in the
same secuence as in the FIELDS clause.
2002-11-18 14:55 UTC+0300 Alexander Kresin <alex@belacy.belgorod.su>

View File

@@ -87,11 +87,28 @@
#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
/*
If you are want to use functions from ADS version 6 or later
(data dictionary support, built-in Internet Server
capabilities, etc.), you must do two things:
1) Link with an ACE32.LIB created from the version 6 or
later dll that imports these functions, and
2) Set this "define" when compiling rddads:
#define ADS_REQUIRE_VERSION6
Otherwise, any version of ADS will work but you won't have
the extra functionality available past v.5.
*/
#command SET AXS LOCKING <x:ON,OFF> ;
=> AdsLocking( if( upper( <(x)> ) == "ON", .t., .f. ) )
@@ -99,26 +116,4 @@
#command SET CHARTYPE TO <x:ANSI,OEM> ;
=> AdsSetCharType( if( upper( <(x)> ) == "OEM", 2, 1 ) )
#command SET DEFAULT TO <(path)> ;
=> Set( _SET_DEFAULT, <(path)> ); AdsSetDefault( <(path)> )
#command SET DEFAULT TO ;
=> Set( _SET_DEFAULT, "" ); AdsSetDefault( "" )
#command SET PATH TO <(path)> ;
=> Set( _SET_PATH, <(path)> ); AdsSetSearchPath( <(path)> )
#command SET PATH TO ;
=> Set( _SET_PATH, "" ); AdsSetSearchPath( "" )
#command SET DELETED <x:ON,OFF,&> ;
=> Set( _SET_DELETED, <(x)> ) ;
;AdsSetDeleted( if( upper( <(x)> ) == "ON", .t., .f. ) )
#command SET DELETED (<x>) ;
=> Set( _SET_DELETED, <x> ); AdsSetDeleted( <x> )
#command SET EPOCH TO <year> ;
=> Set( _SET_EPOCH, <year> ); AdsSetEpoch( <year> )
#command SET DATE FORMAT [TO] <c> ;
=> Set( _SET_DATEFORMAT, <c> ); AdsSetDateFormat( <c> )
#command COMMIT => AdsWriteAllRecords()

View File

@@ -69,6 +69,7 @@
static ERRCODE adsRecCount( ADSAREAP pArea, ULONG * pRecCount );
static ERRCODE adsScopeInfo( ADSAREAP pArea, USHORT nScope, PHB_ITEM pItem );
static ERRCODE adsSetScope( ADSAREAP pArea, LPDBORDSCOPEINFO sInfo );
static iSetListenerHandle;
HB_FUNC( _ADS );
HB_FUNC( ADS_GETFUNCTABLE );
@@ -77,6 +78,8 @@ extern int adsFileType; /* current global setting */
extern int adsLockType;
extern int adsRights;
extern int adsCharType;
extern BOOL bDictionary;
extern ADSHANDLE adsConnectHandle;
#ifdef HB_PCODE_VER
#undef HB_PRG_PCODE_VER
@@ -102,6 +105,48 @@ HB_INIT_SYMBOLS_END( ads1__InitSymbols )
static RDDFUNCS adsSuper = { NULL };
void adsSetListener_callback( HB_set_enum setting, HB_set_listener_enum when )
{
HB_TRACE(HB_TR_DEBUG, ("adsSetListener_callback (%d %d)", setting, when));
if ( when == HB_SET_LISTENER_AFTER ) /* we don't do anything with BEFORE calls */
{
switch ( setting )
{
case HB_SET_DATEFORMAT :
AdsSetDateFormat( (UNSIGNED8*) hb_set.HB_SET_DATEFORMAT );
break;
case HB_SET_DEFAULT :
AdsSetDefault( (UNSIGNED8*) hb_set.HB_SET_DEFAULT );
break;
case HB_SET_DELETED :
AdsShowDeleted( ! hb_set.HB_SET_DELETED );
break;
case HB_SET_EPOCH :
AdsSetEpoch( hb_set.HB_SET_EPOCH );
break;
case HB_SET_EXACT :
AdsSetExact( hb_set.HB_SET_EXACT );
break;
case HB_SET_PATH :
AdsSetSearchPath( (UNSIGNED8*) hb_set.HB_SET_PATH );
break;
/* Possible TODO?
case HB_SET_MFILEEXT :
if( hb_set.HB_SET_MFILEEXT ) hb_retc( hb_set.HB_SET_MFILEEXT );
break;
case HB_SET_STRICTREAD :
hb_retl( hb_set.HB_SET_STRICTREAD );
break;
*/
}
}
}
static void commonError( ADSAREAP pArea, USHORT uiGenCode, USHORT uiSubCode, char* filename )
{
PHB_ITEM pError;
@@ -785,6 +830,7 @@ static ERRCODE adsCreateFields( ADSAREAP pArea, PHB_ITEM pStruct )
pFieldInfo.uiType = HB_IT_LONG;
pFieldInfo.uiTypeExtended = ADS_DOUBLE;
pFieldInfo.uiLen = 8;
pFieldInfo.uiDec = uiDec;
}
else
return FAILURE;
@@ -1044,6 +1090,8 @@ static ERRCODE adsGetValue( ADSAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
HB_TRACE(HB_TR_DEBUG, ("adsGetValue(%p, %hu, %p)", pArea, uiIndex, pItem));
dVal = 0;
if( uiIndex > pArea->uiFieldCount )
return FAILURE;
@@ -1603,7 +1651,14 @@ static ERRCODE adsOpen( ADSAREAP pArea, LPDBOPENINFO pOpenInfo )
pArea->hStatement = 0;
pArea->hOrdCurrent = 0;
ulRetVal = AdsOpenTable ( 0, pOpenInfo->abName, pOpenInfo->atomAlias,
if (bDictionary)
ulRetVal = AdsOpenTable ( adsConnectHandle, pOpenInfo->abName, pOpenInfo->atomAlias,
ADS_DEFAULT, adsCharType, adsLockType, adsRights,
( (pOpenInfo->fShared) ? ADS_SHARED : ADS_EXCLUSIVE ) |
( (pOpenInfo->fReadonly) ? ADS_READONLY : ADS_DEFAULT ),
&hTable);
else
ulRetVal = AdsOpenTable ( 0, pOpenInfo->abName, pOpenInfo->atomAlias,
pArea->iFileType, adsCharType, adsLockType, adsRights,
( (pOpenInfo->fShared) ? ADS_SHARED : ADS_EXCLUSIVE ) |
( (pOpenInfo->fReadonly) ? ADS_READONLY : ADS_DEFAULT ),
@@ -1943,7 +1998,7 @@ static ERRCODE adsOrderCreate( ADSAREAP pArea, LPDBORDERCREATEINFO pOrderInfo )
HB_TRACE(HB_TR_DEBUG, ("adsOrderCreate(%p, %p)", pArea, pOrderInfo));
if( !pArea->lpdbOrdCondInfo || ( pArea->lpdbOrdCondInfo->fAll &&
if( !pArea->lpdbOrdCondInfo || ( pArea->lpdbOrdCondInfo->fAll &&
!pArea->lpdbOrdCondInfo->fAdditive ) )
SELF_ORDLSTCLEAR( ( AREAP ) pArea );
@@ -2029,7 +2084,7 @@ static ERRCODE adsOrderCreate( ADSAREAP pArea, LPDBORDERCREATEINFO pOrderInfo )
}else
pArea->hOrdCurrent = phIndex;
if( pArea->lpdbOrdCondInfo && !pArea->lpdbOrdCondInfo->fAll &&
if( pArea->lpdbOrdCondInfo && !pArea->lpdbOrdCondInfo->fAll &&
!pArea->lpdbOrdCondInfo->fAdditive )
{
ADSHANDLE ahIndex[50];
@@ -2779,6 +2834,9 @@ BOOL adsExists( PHB_ITEM pItemTable, PHB_ITEM pItemIndex )
static ERRCODE adsExit( void )
{
AdsApplicationExit();
if ( iSetListenerHandle )
hb_setListenerRemove( iSetListenerHandle ) ;
return SUCCESS;
}
@@ -2893,11 +2951,14 @@ HB_FUNC( ADS_GETFUNCTABLE )
uiCount = ( USHORT * ) hb_itemGetPtr( hb_param( 1, HB_IT_POINTER ) );
* uiCount = RDDFUNCSCOUNT;
HB_TRACE(HB_TR_DEBUG, ("ADS_GETFUNCTABLE(%i, %p)", uiCount, pTable));
HB_TRACE(HB_TR_DEBUG, ("ADS_GETFUNCTABLE(%i, %p)", *uiCount, pTable));
pTable = ( RDDFUNCS * ) hb_itemGetPtr( hb_param( 2, HB_IT_POINTER ) );
if( pTable )
{
iSetListenerHandle = hb_setListenerAdd( adsSetListener_callback );
hb_retni( hb_rddInherit( pTable, &adsTable, &adsSuper, 0 ) );
}
else
hb_retni( FAILURE );
}

View File

@@ -64,6 +64,7 @@
#include "hbstack.h"
#define HARBOUR_MAX_RDD_FILTER_LENGTH 256
#define MAX_STR_LEN 255
extern ERRCODE adsCloseCursor( ADSAREAP pArea );
int adsFileType = ADS_CDX;
@@ -71,6 +72,7 @@ int adsLockType = ADS_PROPRIETARY_LOCKING;
int adsRights = 1;
int adsCharType = ADS_ANSI;
ADSHANDLE adsConnectHandle = 0;
BOOL bDictionary = FALSE; /* Use Data Dictionary? */
PHB_ITEM itmCobCallBack = 0;
@@ -243,12 +245,28 @@ HB_FUNC( ADSSETCHARTYPE )
HB_FUNC( ADSSETDEFAULT )
{
UNSIGNED8 pucDefault[ MAX_STR_LEN+1];
UNSIGNED16 pusLen = MAX_STR_LEN;
AdsGetDefault( pucDefault, &pusLen);
hb_retclen( pucDefault, pusLen );
if( ISCHAR(1) )
AdsSetDefault( (UNSIGNED8*) hb_parc( 1 ) );
}
HB_FUNC( ADSSETSEARCHPATH )
{
UNSIGNED8 pucPath[ MAX_STR_LEN+1];
UNSIGNED16 pusLen = MAX_STR_LEN;
AdsGetSearchPath( pucPath, &pusLen);
hb_retclen( pucPath, pusLen );
if( ISCHAR(1) )
AdsSetSearchPath( (UNSIGNED8*) hb_parc( 1 ) );
}
@@ -256,7 +274,25 @@ HB_FUNC( ADSSETSEARCHPATH )
HB_FUNC( ADSSETDELETED )
{
UNSIGNED16 usShowDeleted = hb_parl( 1 );
AdsShowDeleted( !usShowDeleted );
UNSIGNED16 pbShowDeleted ;
AdsGetDeleted( &pbShowDeleted ) ;
hb_retl( ! pbShowDeleted );
if( ISLOG(1) )
AdsShowDeleted( !usShowDeleted );
}
HB_FUNC( ADSSETEXACT )
{
UNSIGNED16 usExact = hb_parl( 1 );
UNSIGNED16 pbExact ;
AdsGetExact( &pbExact ) ;
hb_retl( pbExact );
if( ISLOG(1) )
AdsSetExact( usExact );
}
HB_FUNC( ADSBLOB2FILE )
@@ -267,7 +303,7 @@ HB_FUNC( ADSBLOB2FILE )
szFileName = hb_parc( 1 );
szFieldName = hb_parc( 2 );
if( !szFileName || !szFieldName || ( strlen( szFileName ) == 0 ) ||
if( !szFileName || !szFieldName || ( strlen( szFileName ) == 0 ) ||
( strlen( szFieldName ) == 0 ) )
{
hb_errRT_DBCMD( EG_ARG, 1014, NULL, "ADSBLOB2FILE" );
@@ -291,7 +327,7 @@ HB_FUNC( ADSFILE2BLOB )
szFileName = hb_parc( 1 );
szFieldName = hb_parc( 2 );
if( !szFileName || !szFieldName || ( strlen( szFileName ) == 0 ) ||
if( !szFileName || !szFieldName || ( strlen( szFileName ) == 0 ) ||
( strlen( szFieldName ) == 0 ) )
{
hb_errRT_DBCMD( EG_ARG, 1014, NULL, "ADSFILE2BLOB" );
@@ -907,6 +943,7 @@ HB_FUNC( ADSDISCONNECT )
if ( ulRetVal == AE_SUCCESS )
{
adsConnectHandle = 0;
hb_retl( 1 );
}
else
@@ -1253,3 +1290,46 @@ HB_FUNC( ADSGETLASTERROR )
hb_retnl( ulLastErr );
}
#ifdef ADS_REQUIRE_VERSION6
HB_FUNC(ADSADDTABLE)
{
UNSIGNED32 ulRetVal;
UNSIGNED8 *pTableName = hb_parc( 1 );
UNSIGNED8 *pTableFileName = hb_parc( 2 );
UNSIGNED8 *pTableIndexFileName = hb_parc( 3 );
ulRetVal= AdsDDAddTable( adsConnectHandle, pTableName, pTableFileName, adsFileType, adsCharType, pTableIndexFileName, NULL);
if ( ulRetVal == AE_SUCCESS )
hb_retl(1);
else
hb_retl(0);
}
HB_FUNC(ADSADDUSERTOGROUP)
{
UNSIGNED32 ulRetVal;
UNSIGNED8 *pGroup = hb_parc( 1 );
UNSIGNED8 *pName = hb_parc( 2 );
ulRetVal = AdsDDAddUserToGroup( adsConnectHandle,
pGroup,
pName);
if ( ulRetVal == AE_SUCCESS )
hb_retl(1);
else
hb_retl(0);
}
HB_FUNC(ADSUSEDICTIONARY)
{
BOOL bOld = bDictionary;
if ( ISLOG( 1 ) )
bDictionary = hb_parl( 1 ) ;
hb_retl(bOld);
}
#endif

View File

@@ -645,14 +645,336 @@
* $END$
*/
/* $DOC$
* $FUNCNAME$
* AdsRegCallBack()
* $CATEGORY$
* Advantage Database RDD
* $ONELINER$
* For Progress displays: Sets a codeblock to be called during indexing
* $SYNTAX$
* AdsRegCallBack( bEval ) --> nil
* $ARGUMENTS$
* <bEval> The codeblock that is eval'ed every 2 seconds during
* indexing. A numeric value of the "percent completed" is passed
* to the codeblock by the ADS server. The codeblock should return
* a logical value: .T. to abort or .F. to not stop indexing.
*
* $RETURNS$
* <nil>
* $DESCRIPTION$
* See ACE.HLP for full details on AdsRegisterProgressCallback.
* ACE32.DLL does not support the EVAL/EVERY clauses. Remember, there
* is an external process doing the indexing that knows nothing of
* Harbour expressions or codeblocks. Even with Local Server it's the
* DLLs doing all the indexing. So to do progress meters
* you need to implement this.
* $EXAMPLES$
* <table>
* FUNCTION Main()
* ...
* AdsRegCallBack( {|nPercent| outputstuff(nPercent)} )
* /* The above codeblock will be called approximately
* every 2 seconds while indexing.
* The codeblock can return .T. to abort. */
* INDEX ON First+LAST+LABEL1+LABEL2 TAG First
* AdsClrCallBack()
* RETURN nil
*
* FUNCTION outputstuff(nPercent) /* The "callback" function */
* ? "output stuff", nPercent
* RETURN inkey() == 27
* /* If press ESC, returns .T. to abort. */
* </table>
* $TESTS$
* $STATUS$
* R
* $COMPLIANCE$
* Harbour extension
* $PLATFORMS$
* Windows 32-bit, Linux
* $FILES$
* Library is RddAds
* Header is ads.ch
* $SEEALSO$
* AdsClrCallBack()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* AdsClrCallBack()
* $CATEGORY$
* Advantage Database RDD
* $ONELINER$
* Clears the callback set by AdsRegCallBack().
* $SYNTAX$
* AdsClrCallBack() --> nil
* $ARGUMENTS$
*
* $RETURNS$
* <nil>
* $DESCRIPTION$
* See AdsRegCallBack().
* $EXAMPLES$
* $TESTS$
* $STATUS$
* R
* $COMPLIANCE$
* Harbour extension
* $PLATFORMS$
* Windows 32-bit, Linux
* $FILES$
* Library is RddAds
* Header is ads.ch
* $SEEALSO$
* AdsRegCallBack()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* ADSSetDefault() *
* $CATEGORY$
* Advantage Database RDD
* $ONELINER$
* Get/Set function for ADS's DEFAULT setting.
* $SYNTAX$
* ADSSetDefault( [<cPath>] ) --> cPriorSetting
* $ARGUMENTS$
* <cPath> Sets new value if passed.
*
* $RETURNS$
* <cPriorSetting>
* $DESCRIPTION$
* This function is NOT recommended! It allows direct access to the
* ADS internal equivalent to SET DEFAULT TO. But this setting is
* automatically maintained by Harbour's Set() function and the
* SET DEFAULT TO command, so normal programming will not use this.
* It exists primarily for testing purposes.
* $EXAMPLES$
* $TESTS$
* $STATUS$
* R
* $COMPLIANCE$
* Harbour extension
* $PLATFORMS$
* Windows 32-bit, Linux
* $FILES$
* Library is RddAds
* Header is ads.ch
* $SEEALSO$
* $END$
*/
/* $DOC$
* $FUNCNAME$
* ADSSetDeleted() *
* $CATEGORY$
* Advantage Database RDD
* $ONELINER$
* Get/Set function for ADS's ShowDeleted() setting.
* $SYNTAX$
* ADSSetDeleted( [<lOnOff>] ) --> lPriorSetting
* $ARGUMENTS$
* <lOnOff> Sets new value if passed. The value is parallel
* to Harbour usage, so pass .F. to see deleted records or .T.
* to hide them. (This is inverted from ADS's AdsShowDeleted()
* syntax.)
*
* $RETURNS$
* <lPriorSetting>
* $DESCRIPTION$
* This function is NOT recommended! It allows direct access to the
* ADS internal equivalent to SET DELETED. But this setting is
* automatically maintained by Harbour's Set() function and the
* SET DELETED ON/OFF command, so normal programming will not use this.
* It exists primarily for testing purposes.
* $EXAMPLES$
* $TESTS$
* $STATUS$
* R
* $COMPLIANCE$
* Harbour extension
* $PLATFORMS$
* Windows 32-bit, Linux
* $FILES$
* Library is RddAds
* Header is ads.ch
* $SEEALSO$
* $END$
*/
/* $DOC$
* $FUNCNAME$
* AdsSetSearchPath() *
* $CATEGORY$
* Advantage Database RDD
* $ONELINER$
* Get/Set function for ADS's AdsSetSearchPath() setting.
* $SYNTAX$
* AdsSetSearchPath( [<cPath>] ) --> cPriorSetting
* $ARGUMENTS$
* <cPath> Sets new value if passed.
*
* $RETURNS$
* <cPriorSetting>
* $DESCRIPTION$
* This function is NOT recommended! It allows direct access to the
* ADS AdsSetSearchPath() setting. But this setting is
* automatically maintained by Harbour's Set() function and the
* SET PATH command, so normal programming will not use this.
* It exists primarily for testing purposes.
* $EXAMPLES$
* $TESTS$
* $STATUS$
* R
* $COMPLIANCE$
* Harbour extension
* $PLATFORMS$
* Windows 32-bit, Linux
* $FILES$
* Library is RddAds
* Header is ads.ch
* $SEEALSO$
* $END$
*/
/* $DOC$
* $FUNCNAME$
* AdsSetExact() *
* $CATEGORY$
* Advantage Database RDD
* $ONELINER$
* Get/Set function for ADS's AdsSetExact() setting.
* $SYNTAX$
* AdsSetExact( [<lOnOff>] ) --> lPriorSetting
* $ARGUMENTS$
* <lOnOff> Sets new value if passed.
* $RETURNS$
* <lPriorSetting>
* $DESCRIPTION$
* This function is NOT recommended! It allows direct access to the
* ADS internal equivalent to SET EXACT. But this setting is
* automatically maintained by Harbour's Set() function and the
* SET EXACT ON/OFF command, so normal programming will not use this.
* It exists primarily for testing purposes.
* $EXAMPLES$
* $TESTS$
* $STATUS$
* R
* $COMPLIANCE$
* Harbour extension
* $PLATFORMS$
* Windows 32-bit, Linux
* $FILES$
* Library is RddAds
* Header is ads.ch
* $SEEALSO$
* $END$
*/
/* $DOC$
* $FUNCNAME$
* ADSSetCharType()
* $CATEGORY$
* Advantage Database RDD
* $ONELINER$
* Sets the type of character data expected when opening tables.
* $SYNTAX$
* ADSSetCharType( <nCharType> ) --> nPriorSetting
* $ARGUMENTS$
* <nCharType> Type of character data in the table.
* From ADS docs:
* Options are ADS_ANSI and ADS_OEM. This indicates the type of
* character data to be stored in the table. For compatibility with
* DOS-based CA-Clipper applications, ADS_OEM should be specified.
* When usTableType is ADS_ADT, this parameter is ignored and ANSI
* is always used.
*
* $RETURNS$
* <nPriorSetting>
* $DESCRIPTION$
* See ACE.HLP for full details about the Advantage Database Server.
* This sets the usCharType parameter used when ADS opens a table.
* $EXAMPLES$
* $TESTS$
* $STATUS$
* R
* $COMPLIANCE$
* Harbour extension
* $PLATFORMS$
* Windows 32-bit, Linux
* $FILES$
* Library is RddAds
* Header is ads.ch
* $SEEALSO$
* AdsRightsCheck(),AdsLocking(), ADSSetFileType()
* $END$
*/
/* $DOC$
* $FUNCNAME$
* AdsIsIndexed()
* $CATEGORY$
* Advantage Database RDD
* $ONELINER$
* Fast determination for if current workarea has a selected index
* $SYNTAX$
* AdsIsIndexed() --> lActiveIndex
* $ARGUMENTS$
*
* $RETURNS$
* <lActiveIndex>
* $DESCRIPTION$
* Equivalent to <b>empty(ordSetFocus())<\b>, but faster.
* $EXAMPLES$
* $TESTS$
* $STATUS$
* R
* $COMPLIANCE$
* Harbour extension
* $PLATFORMS$
* Windows 32-bit, Linux
* $FILES$
* Library is RddAds
* $SEEALSO$
* $END$
*/
/* TO-DO:
ADSSetCharType
ADSSetDefault
ADSSetDeleted
ADSSetFileType
ADSSetServerType
AdsIsExprValid
ADSGETCONNECTIONHANDLE
AdsGetLastError
AdsSetRelKeyPos
AdsGetRelKeyPos
v6:
AdsAddTable
AdsAddUserToGroup
ADSUSEDICTIONARY
AdsAddCustomKey
AdsDeleteCustomKey
AdsGetTableAlias
AdsConnect
AdsDisconnect
AdsCloseAllTables
AdsWriteAllRecords
AdsRefreshRecord
AdsCopyTable
AdsConvertTable
AdsGetNumIndexes
ADSDecryptRecord
ADSDecryptTable
@@ -663,5 +985,42 @@ ADSEncryptTable
ADSIsEncryptionEnabled
ADSIsRecordEncrypted
ADSIsTableEncrypted
*/
/* $DOC$
* $FUNCNAME$
* xxx()
* $CATEGORY$
* Advantage Database RDD
* $ONELINER$
* xxx
* $SYNTAX$
* xxx( <lMode> ) --> lPriorSetting
* $ARGUMENTS$
* <lMode> xxx
* xxx
*
* $RETURNS$
* <lPriorSetting>
* $DESCRIPTION$
* See ACE.HLP for full details about the Advantage Database Server.
* ADSRightsCheck() is a Get/Set function for the "rights checking" mode.
* $EXAMPLES$
* $TESTS$
* $STATUS$
* R
* $COMPLIANCE$
* Harbour extension
* $PLATFORMS$
* Windows 32-bit, Linux
* $FILES$
* Library is RddAds
* Header is ads.ch
* $SEEALSO$
* xxx()
* $END$
*/

View File

@@ -74,15 +74,42 @@
* ACE will <b>always</b> automatically open an index with the same
* name as the data file. There is no way to turn this feature off.
* Be sure to use the command SET DEFAULT TO (cDir) and not its
* equivalent Set() function call. The Set() function will not make
* the call to ADS to change its internal setting, but the command
* will. The same is true for DATEFORMAT, DELETE, and EPOCH.
* For programmers who are already familiar with the
* ACE engine, this also means there are some differences
* between the RDDADS in Harbour and the parallel ACE documentation.
* You can use the Set() function call as well as the equivalent
* commands for SET DEFAULT TO, DATEFORMAT, DELETE, and EPOCH.
* Harbour automatically makes the call to ADS to change its internal
* setting to match Harbour's.
* INDEXING and Progress Displays:
* ACE32.DLL does not support the EVAL/EVERY clauses. Remember, there
* is an external process doing the indexing that knows nothing of
* Harbour expressions or codeblocks. Even with Local Server it's the
* DLLs doing all the indexing. So to do progress meters
* you need to implement <b>adsRegCallback( bEval )</b>.
* It lets you set a codeblock that is eval'ed every 2 seconds.
* A numeric value of the "percent completed" is passed to the
* codeblock by the ADS server.
*
* <table>
* FUNCTION Main()
* ...
* AdsRegCallBack( {|nPercent| outputstuff(nPercent)} )
* /* The above codeblock will be called approximately
* every 2 seconds while indexing.
* The codeblock can return .T. to abort. */
* INDEX ON First+LAST+LABEL1+LABEL2 TAG First
* AdsClrCallBack()
* RETURN nil
*
* FUNCTION outputstuff(nPercent) /* The "callback" function */
* ? "output stuff", nPercent
* RETURN inkey() == 27
* /* If press ESC, returns .T. to abort. */
* </table>
*
* For programmers who are already familiar with the ACE engine,
* Harbour's compatibility with dbfcdx means there are some differences
* between the RDDADS in Harbour and the parallel ACE documentation:
*
* 1) In ACE, skipping backwards to BOF goes to the phantom record and
* sets the record number to 0. In RDDADS, the record pointer stays at
* the Top record and only the BOF flag is set to True.