GetResourceLimit()


" "

short GetResourceLimit(short Resource, long* Value)

Description

This function gets the requested resource limit. Call InitializeServer() prior to calling this function, because resource limits are handled on a per-server basis.

Parameters


Resource values are:
0 (RSR_IDLE_CONNECTION_TIMEOUT) Idle connection timeout (in seconds)
1 (RSR_IDLE_QUERY_TIMEOUT_CANCEL) Idle query timeout (in seconds)
2 (RSR_IDLE_QUERY_TIMEOUT_WARNING) Idle query timeout (in seconds). This is the warning limit; it is not enforced for the QMF for Windows API.
3 (RSR_SERVER_RESPONSE_TIMEOUT_CANCEL) Server timeout (in seconds).
4 (RSR_SERVER_RESPONSE_TIMEOUT_WARNING) Server timeout (in seconds). This is the warning limit; it is not enforced for the QMF for Windows API.
5 (RSR_MAX_ROWS_TO_FETCH_CANCEL) Maximum number of rows to fetch.
6 (RSR_MAX_ROWS_TO_FETCH_WARNING) Maximum number of rows to fetch. This is the warning limit; it is not enforced for the QMF for Windows API.
7 (RSR_MAX_BYTES_TO_FETCH_CANCEL) Maximum number of bytes to fetch.
8 (RSR_MAX_BYTES_TO_FETCH_WARNING) Maximum number of bytes to fetch. This is the warning limit; it is not enforced for the QMF for Windows API.
9 (RSR_MAX_CONNECTIONS) Maximum number of connections allowed to the database server.
10 (RSR_ALLOW_SERVER_ACCESS_UI) Specifies whether access is allowed to the database server from the QMF for Windows user interface.
11 (RSR_ALLOW_SERVER_ACCESS_API) Specifies whether access is allowed to the database server from the QMF for Windows API
12 (RSR_FETCH_ALL_ROWS) Specifies whether all rows are automatically fetched.
13 (RSR_CONFIRM_UPDATES) Specifies whether to confirm database server updates. This option has no effect on the QMF for Windows API database updates.
14 (RSR_SUMMARY_TRACKING) Specifies whether summary object tracking is enabled.
15 (RSR_DETAILED_TRACKING) Specifies whether detailed object tracking is enabled.
16 (RSR_SQL_TRACKING) Specifies whether SQL text tracking is enabled.
17 (RSR_ADHOC_TRACKING) Specifies whether ad hoc object tracking is enabled.
18 (RSR_ALLOW_ACQUIRE) Specifies whether the SQL verb ACQUIRE is allowed.
19 (RSR_ALLOW_ALTER) Specifies whether the SQL verb ALTER is allowed.
20 (RSR_ALLOW_COMMENT) Specifies whether the SQL verb COMMENT is allowed.
21 (RSR_ALLOW_CREATE) Specifies whether the SQL verb CREATE is allowed.
22 (RSR_ALLOW_DELETE) Specifies whether the SQL verb DELETE is allowed.
23 (RSR_ALLOW_DROP) Specifies whether the SQL verb DROP is allowed.
24 (RSR_ALLOW_EXPLAIN) Specifies whether the SQL verb EXPLAIN is allowed.
25 (RSR_ALLOW_GRANT) Specifies whether the SQL verb GRANT is allowed.
26 (RSR_ALLOW_INSERT) Specifies whether the SQL verb INSERT is allowed.
27 (RSR_ALLOW_LABEL) Specifies whether the SQL verb LABEL is allowed.
28 (RSR_ALLOW_LOCK) Specifies whether the SQL verb LOCK is allowed.
29 (RSR_ALLOW_REVOKE) Specifies whether the SQL verb REVOKE is allowed.
30 (RSR_ALLOW_SELECT) Specifies whether the SQL verb SELECT is allowed.
31 (RSR_ALLOW_SET) Specifies whether the SQL verb SET is allowed.
33 (RSR_ALLOW_UPDATE) Specifies whether the SQL verb UPDATE allowed.
34 (RSR_ALLOW_CALL) Specifies whether the SQL verb CALL is allowed.
35 (RSR_ALLOW_SAVE_DATA) Specifies whether the Save Data command is allowed.
36 (RSR_SAVE_DATA_TABLE_SPACE_NAME) The default table space name for the Save Data command.
37 (RSR_SAVE_DATA_TABLE_SPACE_NAME_OVERRIDE) Specifies whether the default table space name for the Save Data command can be overridden by the user.
38 (RSR_ALLOW_BIND_PACKAGE) Specifies whether the binding of packages is allowed.
39 (RSR_DEF_COLLECTION) The default collection name for binding packages.
40 (RSR_DEF_COLLECTION_OVERRIDE) Specifies whether the default collection name for binding packages can be overridden by the user.
41 (RSR_DEF_ISOLATION_LEVEL) The default isolation level for binding packages.
42 (RSR_DEF_ISOLATION_LEVEL_OVERRIDE) Specifies whether the default isolation level for binding packages can be overridden by the user.
43 (RSR_ALLOW_TABLE_EDIT) Specifies whether the use of the table editor is allowed.
44 (RSR_ALLOW_EXPORT) Specifies whether the exporting of data is allowed.
45 (RSR_ALLOW_SAVED_QUERIES_ONLY) Specifies whether the user is allowed to run only saved queries.
46 (RSR_ALLOW_DROP_PACKAGE) Specifies whether the dropping of packages is allowed.
47 (RSR_QUERY_ISOLATION_LEVEL) The isolation level to use when running queries.
48 (RSR_ACCOUNT) The string specifying account information to pass when connecting to the database server.
49 (RSR_ACCOUNT_OVERRIDE) Specifies whether the string, specifying the default account information passed to the database server, can be overridden by the user.
50 (RSR_RETRIEVE_LOB_OPTION) Specifies LOB option to use when retrieving LOB data.
51 (RSR_MAX_LOB_COLUMN_SIZE) Specifies the maximum LOB columns size in kilobytes.
52 (RSR_LOB_OPTION_OVERRIDE) Specifies whether the default LOB option setting can be overridden by the user.
53 (RSR_RPTCRT_ALLOW_DISPLAY_ALL) Specifies whether the user can see QMF objects at the server through Report Center.
54 (RSR_RPTCTR_ALLOW_ADMINISTER_ROOT) Allows the user to add Public Favorites directly underneath the Public Favorites folder in Report Center.
55 (RSR_RPTCTR_ALLOW_TAKE_OWNERSHIP) Allows the user to take ownership of Public Favorites in Report Center.
56 (RSR_ALLOW_REFRESH) Specifies whether the SQL verb REFRESH is allowed.
57 (RSR_ALLOW_RENAME) Specifies whether the SQL verb RENAME is allowed.
58 (RSR_ACCOUNT_REQUIRED) Specifies whether account information must be specified when connecting to a database server.
59 (RSR_SAVING_LOB_OPTION) Specifies whether users can save LOB data on the database server.
Value A pointer to a long integer where the result is stored. The result is the value of the requested resource limit. For Boolean values, the result is non-zero for true, zero for false. For RSR_SAVE_DATA_TABLE_SPACE_NAME, RSR_DEF_COLLECTION, and RSR_ACCOUNT_STRING, a negative one (-1) is returned and the ResourceLimit property can be interrogated for the returned string value.

Return Value

The return value will be zero if successful or non-zero if unsuccessful. If the return value is non-zero, you can call GetLastErrorString() or GetLastErrorType() to get additional error information.