Difference between revisions of "OpenDBX/C API/odbx set option"
From Linuxnetworks
(→Description:) |
(→Parameters:) |
||
| Line 19: | Line 19: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- style="background: #F0F0F0" | |- style="background: #F0F0F0" | ||
| − | ! Option !! Description !! Values | + | ! Option !! Description !! Values !! Release |
|- | |- | ||
| − | | ODBX_OPT_MULTI_STATEMENTS || Multiple statements per query || boolean | + | | ODBX_OPT_MULTI_STATEMENTS || Multiple statements per query || boolean || |
|- | |- | ||
| − | | ODBX_OPT_PAGED_RESULTS || Transfer of multiple rows at once || boolean | + | | ODBX_OPT_PAGED_RESULTS || Transfer of multiple rows at once || boolean || |
|- | |- | ||
| − | | ODBX_OPT_COMPRESS || Support of compressed || boolean | + | | ODBX_OPT_COMPRESS || Support of compressed || boolean || |
|- | |- | ||
| − | | ODBX_OPT_TLS || Encryption (SSL/TLS) support || ODBX_TLS_NEVER<br/> ODBX_TLS_TRY<br/>ODBX_TLS_ALWAYS | + | | ODBX_OPT_MODE || Backend specific (SQL) mode || string || 1.1.4 |
| + | |- | ||
| + | | ODBX_OPT_TLS || Encryption (SSL/TLS) support || ODBX_TLS_NEVER<br/> ODBX_TLS_TRY<br/>ODBX_TLS_ALWAYS || | ||
|} | |} | ||
Revision as of 23:55, 18 January 2007
int odbx_set_option(
odbx_t* handle,
unsigned int option,
void* value )
Description:
Sets the specified options in the backend. You should test the option with odbx_get_option() before trying to set it to a new value. Otherwise you might get an error if the option is not supported by the backend.
Parameters:
- handle: Connection object created by odbx_init()
- option: Options listed below
- value: Pointer of the variable where the option value (most of the time zero or one) is stored
| Option | Description | Values | Release |
|---|---|---|---|
| ODBX_OPT_MULTI_STATEMENTS | Multiple statements per query | boolean | |
| ODBX_OPT_PAGED_RESULTS | Transfer of multiple rows at once | boolean | |
| ODBX_OPT_COMPRESS | Support of compressed | boolean | |
| ODBX_OPT_MODE | Backend specific (SQL) mode | string | 1.1.4 |
| ODBX_OPT_TLS | Encryption (SSL/TLS) support | ODBX_TLS_NEVER ODBX_TLS_TRY ODBX_TLS_ALWAYS |
Return values:
- ODBX_ERR_SUCCESS on success
- Less than zero if an error occured
Errors:
- -ODBX_ERR_PARAM: One of the parameters or its content is invalid
- -ODBX_ERR_OPTION: Unknown option
- -ODBX_ERR_OPTRO: Option is read-only
- -ODBX_ERR_OPTWR: Setting option failed
Back to Overview