Get database parameter

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2004.5 (Modified)


Get database parameter ({table; }selector{; stringValue}) Longint

ParameterTypeDescription
tableTableTable from which to get the parameter, or
Default table if this parameter is omitted
selectorLongintCode of the database's parameter
stringValueStringString value of the parameter
Function resultLongintCurrent value of the parameter

Description

The Get database parameter command allows you to get the current value of a 4D database parameter. When the parameter value is a character string, it is returned in the stringValue parameter.

The selector parameter designates the parameter to get. 4th Dimension offers you the following predefined constants, which are in the "Database Parameters" theme:

ConstantTypeValue
Seq Order RatioLongint1
Seq Access OptimizationLongint2
Seq Distinct Values RatioLongint3
Index CompactingLongint4
Seq Query Select RatioLongint5
Minimum Web ProcessLongint6
Maximum Web ProcessLongint7
Web conversion modeLongint8
Database Cache SizeLongint9
4th Dimension SchedulerLongint10
4D Server SchedulerLongint11
4D Client SchedulerLongint12
4D Server TimeoutLongint13
4D Client TimeoutLongint14
Port IDLongint15
IP Address to listenLongint16
Character setLongint17
Max Concurrent Web ProcessesLongint18
Client Minimum process WebLongint19
Client Maximum process WebLongint20
Client Maximum Web requests sizeLongint21
Client Port IDLongint22
Client IP Address to listenLongint23
Client Character setLongint24
Client Max Concurrent Web ProcLongint25
Cache Writing ModeLongint26
Maximum Web requests sizeLongint27
4D Server Log RecordingLongint28
Web Log RecordingLongint29
Client Web Log RecordingLongint30
Table Sequence NumberLongint31
Real Display PrecisionLongint32
TCP_NODELAYLongint33
Debug Log RecordingLongint34
Client Server Port IDLongint35
WEDD Signature Longint36
Invert ObjectsLongint37
HTTPS Port IDLongint39
Client HTTPS Port IDLongint40

To know the values that could be returned by this function for the selectors 1 to 8 and 10 to 40, as well as the scope of each selector, please refer to the description of the SET DATABASE PARAMETER command.

The Database Cache Size (9) selector allows you to get the current database memory cache size. The returned value is expressed in bytes.

The Maximum Cache size is set on the "Database/Data Management" page of the Preferences. The actual size allocated to the database cache however will depend on both the settings and the current system resources. The Get database parameter command allows you to get the actual size of the memory allocated to the database cache by 4D.

Note: You cannot set the database cache memory size using the language. In other words, the Database Cache Size selector cannot be set using the SET DATABASE PARAMETER command.

When you use the WEDD Signature (36) selector with this command, the string defined as the WEDD signature is returned in the optional stringValue parameter and the function returns 0.

Examples

1. The following method allows you to get 4D scheduler current values:

   C_LONGINT($ticksbtwcalls;$maxticks;$minticks;$lparams)
   If (Application type=4th Dimension) ` 4D single user is used
      $lparams:=Get database parameter(4th Dimension scheduler)
      $ticksbtwcalls:=$lparams & 0x00ff
      $maxticks:=($lparams>>8) & 0x00ff
      $minticks:=($lparams>>16) & 0x00ff
   End if

2. The selector 16 (IP Address to listen) lets you get the IP address on which the 4D Web server receives HTTP requests. The following example splits up the hexadecimal value:

   C_LONGINT($a;$b;$c;$d)
   C_LONGINT($addr)
   $addr:=Get database parameter(IP Address to listen)
   $a:=($addr>>24)&0x000000ff
   $b:=($addr>>16)&0x000000ff
   $c:=($addr>>8)&0x000000ff
   $d:=$addr&0x000000ff

See Also

DISTINCT VALUES, QUERY SELECTION, SET DATABASE PARAMETER.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next