Configuring PSQL Servers with DTO : DtoSetting Object
 
DtoSetting Object
This object represents a configuration setting.
Properties
AllPossibleSelections
Returns DtoSelectionItems Collection or DtoSelectionItem Object representing all the possible items in a single or multiple type setting.
This property is only valid for a setting with property Type of ’dtoSingleSelection’ or ’dtoMultiSelection’, which corresponds to property TypeNames of ’Single Selection’ and ’Multiple Selection’.
Category
Returns the DtoCategory object associated with this setting.
DefaultValue
Returns the default value for the setting.
The returned value is a variant based on the Type of the setting.
A Type of Single selection returns a DtoSelectionItem object.
A Type of Multiple selection returns a DtoSelectionItems collection.
Factor
Returns the factor value of the setting.
For example, many settings are stored by PSQL in bytes, but for the purpose of changing the setting the user might input a value in kilobytes.
If a setting returned 16384 for the Value property and the Factor property returned 1024, your program should divide 16384 by 1024 and return 16 to the user. Then query the FactorString property to get the new units. In this case, it would be kilobytes.
Before setting the Value property , you should multiply the user-supplied value by Factor.
FactorString
Returns the units for the Value property adjusted for the Factor property. For example, if the UnitString property returns "byte(s)", the FactorString property will return "kbyte(s)" and Factor property will return "1024".
FalseString
Returns the false value for a Boolean type setting.
This property is only valid for a Boolean type setting. Use the Type property to determine if the setting is Boolean.
Help
Returns the help text associated with a setting.
IsClient
Returns a Boolean of whether the setting is applicable to a PSQL Client or a Server.
True = Client
False = Server
Max
Returns the maximum value of a Long type setting.
This property is only valid for a Long type setting. Use the Type property to determine if the setting is Long.
If this property returns a negative number, interpret it as follows:
/* Maximum valid memory or disk size */P_MAX_MEM_DISK_SIZE -129
/* Maximum size limited by available disk space */P_MAX_LIMITED_BY_DISK -2
/* Maximum size limited by available memory */P_MAX_LIMITED_BY_MEMORY -1
Min
Returns the minimum value of a Long type setting.
This property is only valid for a Long type setting. Use the Type property to determine if the setting is Long.
This property returns -1 if the property is not applicable.
Name
Returns the name of the setting.
Rank
Returns the rank of a setting. The rank groups settings according to whether they apply to advanced users only.
0 = Normal
1 = Advanced
Session
Returns the session associated with this object.
SettingID
Returns the unique identifier for a setting .
TrueString
Returns the true value for a Boolean type setting.
This property is only valid for a Boolean type setting. Use the Type property to determine if the setting is Boolean.
Type
Returns the setting type ( Setting Type enumeration)
0 = Boolean
1 = Long
2 = String
3 = Single selection
4 = Multiple selection
TypeName
Returns the setting type in string form
Boolean
Long
String
Single selection
Multiple selection
UnitString
Returns the measure of a long type setting.
For example: seconds, bytes
To adjust the Value for a more user-friendly range of values, use the Factor and FactorString properties.
Value
Gets or sets the value of a setting.
The returned value is a variant based on the Type of the setting.
A Type of Single selection returns a DtoSelectionItem object.
A Type of Multiple selection returns a DtoSelectionItems collection.
When setting this property for a Long type setting, check to see that the value is within the limits for the particular setting by querying the Min and Max properties.
Collections
DtoSelectionItems Collection
Methods
None
Remarks
Use the Type property to find the type of the setting. Note that, depending on the type:
The properties TrueString and FalseString apply to Boolean type settings (0) only.
The properties Factor, FactorString, Max, Min, and UnitString apply to Long type settings (1) only.
Example
Set my_settings = my_category.Settings
Set first_setting = my_settings(1)
See Also
DtoCategories Collection
DtoCategory Object