SysProp

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Methods >

SysProp

Declaration

function SysProp( uiSysItem : word; vpData : Pointer ): LongInt;

Description

Sets or retrieves Apollo system information. For calls that return pointer-based information, pass a pre-declared Pointer type for vpData to be filled; Otherwise, pass nil for this parameter. For calls that do not return a pointer-based value, the value is returned as a LongInt.

Parameters

uiSysItem: One of the predefined constant values listed below, indicating the type of information to be set or retrieved.

vpData: General purpose pointer. This pointer is used by some properties to pass in a workarea number or even a pointer to a structure to be filled.

image\tip.gif The ApolloEngInt.PAS file contains a new TApolloEngine class, which is dynamically created and assigned to a new global varialb claled "ApolloEngine". This new variable is available to any unit that includes ApolloEngInt and provides some useful property setting methods specifically designed to set collation sequences easily. See ApolloEngine for more details.

 

Constant Value

vpData Value

Return Value

SDE_SP_GETADDQUERY

SDE_SP_SETADDQUERY

 

Get/set the AddQueryFlag

SDE_SP_GETCHRCOLLATE

SDE_SP_SETCHRCOLLATE

Bool

Array of Char[0..255]

Get/set the collation sequence for Windows tables. See OEM for DOS tables. See Sorting.

SDE_SP_GETDELETED

 

 

Get Deleted value

SDE_SP_GETDESCENDING

 

Order Number (Integer)

Get Descending value (Bool)

SDE_SP_GETDISABLEAUTO

SDE_SP_SETDISABLEAUTO

NULL

New AutoOpen setting (Bool)

Get/set AutoOpen setting (Bool)

SDE_SP_GETDRIVER

 

Workarea Number (Integer)

Get the active driver:

1 = SDENTX

2 = SDEFOX

3 = SDENSX

4 = SDENSX_DBT

SDE_SP_GETDUDENCOLLATE

SDE_SP_SETDUDENCOLLATE

NULL

New Duden Collation (Bool)

Get/set the German Duden Collation setting (Bool)

SDE_SP_GETEMPTY

 

Order Number (Integer)

Get Empty Value (Bool)

SDE_SP_GETEXACT

SDE_SP_SETEXACT

NULL

New Exact Value

Get/set Exact value (Bool)

SDE_SP_GETINDEXCOUNT

 

NULL

 

Number of index tags in the current workarea

SDE_SP_GETLANGUAGECOLLATE

 

NULL

 

Get/set language, according to collation done

SDE_SP_GETLGTRCOLLATE

SDE_SP_SETLGTRCOLLATE

NULL

 

Get/set the ligatures collation dimmension

SDE_SP_GETLIMITCASECONV

SDE_SP_SETLIMITCASECONV

NULL

New Case-Conversion setting Boo(Bool)

Current Case-Conversion setting (Bool) Limit case conv to A-Z, a-z if TRUE.

SDE_SP_GETOBUFFER

SDE_SP_SETOBUFFER

NULL

New Setting (Bool)

Get/set Optimistic Buffer Setting (Bool)

SDE_SP_GETOEMCOLLATE

SDE_SP_SETOEMCOLLATE

NULL

Array of Char[0..255]

Get/set the collation sequence for OEM tables. See Windows for Win tables.

SDE_SP_GETQUERYRELAXFLAG

SDE_SP_SETQUERYRELAXFLAG

NULL

 

Get flag that dictates rules of query

SDE_SP_GETSECURITY

SDE_SP_SETSECURITY

NULL

 

Get Server Security

SDE_SP_GETSOFTSEEK

SDE_SP_SETSOFTSEEK

NULL

New SoftSeek Value (Bool)

Get/set SoftSeek value (Bool)

SDE_SP_GETSPECIALCOLLATE

SDE_SP_SETSPECIALCOLLATE

NULL

Bool

Get/set the international collation such as DUDEN collate flag

SDE_SP_GETSTRINGTYPE

SDE_SP_SETSTRINGTYPE

NULL

 

Get/set the stringtype flag

SDE_SP_GETUSECONDITIONAL

SDE_SP_SETUSECONDITIONAL

NULL

New UseConditional Value (Bool)

Get/set UseConditional Value (Bool)

SDE_SP_PUTOBUFFER

 

NULL

Cause immediate flush of optimistic buffer

SDE_SP_SETDBTNSX

Bool

Allows DBF/DBT to use NSX index driver

SDE_SP_SETDEFAPPEND

Bool

Set default behavior for ordering of non-unique keys like FOX/Clipper.

SDE_SP_SETSTRDEFDEC

Integer

Set the default decimals for the STR() function, if 3rd parameter is absent and field length is zero.

SDE_SP_SETSTRDEFLEN

Integer

Set the default length for STR() function, if 2nd parameter is absent and field length zero

SDE_SP_SETWRITEBLOBHDR

Bool

Set the bWriteBlobHdr

 

Return Value

Varies depending on the type of data being requested. For example, logical return values are returned as 0 for False and any non-zero value for True. If the information requested is being returned as a pointer to a static buffer, the LongInt return value will contain this pointer address.

Delphi Example

// Get SoftSeek value

lRetVal := ApTbl.SysProp( SDE_SP_GETSOFTSEEK, nil );

 

// Get Exact setting

lRetVal := ApTbl.SysProp( SDE_SP_GETEXACT, nil );

 

// Get Driver value for current workarea

lRetVal := ApTbl.SysProp( SDE_SP_GETDRIVER, nil );

 

// Get Driver value for workarea 1

lVal := 1;

lRetVal := ApTbl.SysProp( SDE_SP_GETDRIVER, Pointer(lVal) );

 

//  Set Optimistic Buffering OFF – Must be done BEFORE opening table

ApTbl.SysProp( SDE_SP_SETOBUFFER, Pointer(0));

 

// Turn on Duden Collation support (For German Duden index sorting)

ApTbl.SysProp( SDE_SP_SETDUDENCOLLATE, Pointer(1));

 

{

Both dBase and Clipper UPPER() and LOWER() case conversion

functions limit the characters eligible for case conversion.  

With UPPER(), only characters a-z are converted to upper case.  

With LOWER(), only characters A-Z are converted. Characters

with diacritical marks are not converted when this switch is

True if OEMTranslate is also set to True. To limit case

conversion using this switch, set OEMTranslate to True  

and set the SysProp value on as well. 

}

ApTbl.OEMTranslate := True;

ApTbl.SysProp( SDE_SP_SETLIMITCASECONV, Pointer(1));

 

The next routine sets a simple ASCII value ordered symbol set. By default, Window's linguistic order is applied to all languages now.

 

Procedure SetOEM( oem: Boolean) ;

var

 sCollationTable : Array[0..255] of Char;

 i : Integer;

begin

 for i := 0 to 255 do

                  sCollationTable[i] := Char(i);

          // if OEMTranslate = True, or if OEM tables are in use, use OEM collation

 if oem then

         ApolloTable1.SysProp(SDE_SP_SETOEMCOLLATE, @sCollationTable[0])

 else

         // if OEMTranslate = False, use regular collation

          ApolloTable1.SysProp(SDE_SP_SETCHRCOLLATE, @sCollationTable[0]);

 

 ApolloTable1.Open;

end;

C++Builder Example

// Get SoftSeek value

lRetVal = ApTbl->SysProp( SDE_SP_GETSOFTSEEK, NULL );

 

// Get Exact setting

lRetVal = ApTbl->SysProp( SDE_SP_GETEXACT, NULL );

 

// Get Driver value for current workarea

lRetVal = ApTbl->SysProp( SDE_SP_GETDRIVER, NULL );

 

// Get Driver value for workarea 1

lVal = 1;

lRetVal = ApTbl->SysProp( SDE_SP_GETDRIVER, Pointer(lVal) );

 

// Set Optimistic Buffering OFF – Must be done BEFORE opening table

ApTbl->SysProp( SDE_SP_SETOBUFFER, Pointer(0) );

 

// Turn on Duden Collation support (For German Duden index sorting) }

ApTbl->SysProp( SDE_SP_SETDUDENCOLLATE, Pointer(1) );

 

/*

Both dBase and Clipper UPPER() and LOWER() case conversion

functions limit the characters eligible for case conversion.  

With UPPER(), only characters a-z are converted to upper case.  

With LOWER(), only characters A-Z are converted. Characters

with diacritical marks are not converted when this switch is

True if OEMTranslate is also set to True. To limit case

conversion using this switch, set OEMTranslate to True  

and set the SysProp value on as well. 

*/

ApTbl->OEMTranslate = True;

ApTbl->SysProp( SDE_SP_SETLIMITCASECONV, Pointer(1));