version 11.3 (Modified)
Get database parameter ({aTable; }selector{; stringValue}) Longint
Parameter | Type | Description | |
aTable | Table | Table from which to get the parameter, or | |
Default table if this parameter is omitted | |||
selector | Longint | Code of the database's parameter | |
stringValue | String | String value of the parameter | |
Function result | Longint | Current 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. 4D offers you the following predefined constants, which are in the "Database Parameters" theme:
Constant | Type | Value |
Seq Order Ratio | **** Selector disabled **** | |
Seq Access Optimization | **** Selector disabled **** | |
Seq Distinct Values Ratio | **** Selector disabled **** | |
Index Compacting | **** Selector disabled **** | |
Seq Query Select Ratio | **** Selector disabled **** | |
Minimum Web Process | Longint | 6 |
Maximum Web Process | Longint | 7 |
Web conversion mode | Longint | 8 |
Database Cache Size | Longint | 9 |
4D Local Mode Scheduler | Longint | 10 |
4D Server Scheduler | Longint | 11 |
4D Remote Mode Scheduler | Longint | 12 |
4D Server Timeout | Longint | 13 |
4D Remote Mode Timeout | Longint | 14 |
Port ID | Longint | 15 |
IP Address to listen | Longint | 16 |
Character set | Longint | 17 |
Max Concurrent Web Processes | Longint | 18 |
Client Minimum process Web | Longint | 19 |
Client Maximum process Web | Longint | 20 |
Client Maximum Web requests size | Longint | 21 |
Client Port ID | Longint | 22 |
Client IP Address to listen | Longint | 23 |
Client Character set | Longint | 24 |
Client Max Concurrent Web Proc | Longint | 25 |
Cache Writing Mode | **** Selector disabled **** | |
Maximum Web requests size | Longint | 27 |
4D Server Log Recording | Longint | 28 |
Web Log Recording | Longint | 29 |
Client Web Log Recording | Longint | 30 |
Table Sequence Number | Longint | 31 |
Real Display Precision | Longint | 32 |
TCP_NODELAY | Longint | 33 |
Debug Log Recording | Longint | 34 |
Client Server Port ID | Longint | 35 |
WEDD Signature | Longint | 36 |
Invert Objects | Longint | 37 |
HTTPS Port ID | Longint | 39 |
Client HTTPS Port ID | Longint | 40 |
Unicode mode | Longint | 41 |
Temporary memory size | Longint | 42 |
SQL Autocommit | Longint | 43 |
SQL Engine Case Sensitivity | Longint | 44 |
Client Log Recording | Longint | 45 |
Query By Formula On Server | Longint | 46 |
Order By Formula On Server | Longint | 47 |
Auto Synchro Resources Folder | Longint | 48 |
QUERY BY FORMULA Joins | Longint | 49 |
HTTP Compression Level | Longint | 50 |
HTTP Compression Threshold | Longint | 51 |
To know the values that could be returned by this function, as well as the scope of each selector and whether or not any changes made are kept between sessions, 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=4D Local Mode) ` 4D local mode is used $lparams:=Get database parameter(4D Local Mode 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.