Programming Guide



dm_set_connection_option

Sets a database connection option

#include <dmuproto.h>
int dm_set_connection_option(char *connection, char *option,
int value);

connection
The name of the connection.

option
The option to be set.

value
The option's new value.

Returns

Description

dm_set_connection_option sets a database connection option to a new value. See Table 5-5 below for a list of the values of option that are supported for each driver.

Table 5-5 Connection options by driver

Option Value

Informix driver

xa_connection*

1 for XA connection; 0 for normal connection.

SQL Server driver

cursor_pool_size

Allow the client code to reuse closed database connections in a pool to reduce overhead when making new connections. The default value is zero, which disables this feature. New in Panther 5.10.

ODBC driver

bind_set_scale

When not zero, the scale is always set when binding numeric columns. Set when connecting to DB2. New in Panther 5.10.

case_flag

Allows setting the case flag for a connection. value can be one of PV_LOWER; PV_UPPER or PV_MIXED. New in Panther 5.50.

count_decimal_digits

When set, the scale will be set when numeric values are bound as character strings. Set when connecting to SQL Server. New in Panther 5.00.

force_char_binding

When this option is set, if the bind type is SQL_VARCHAR, it is set to SQL_CHAR. Set when connecting to Oracle and Informix. New in Panther 4.60.

force_date_convert

When set, date fields will always be bound in the internal ODBC date format even when character string binding is requested. Set when connecting to Oracle. New in Panther 4.60.

long_date_bind

When set, uses at least 19 characters when binding SQL_TIMESTAMP columns. Set when connecting to SQL Server. New in Panther 5.10.

oracle_empty_string

Special null string handling for Oracle. Set when connecting to Oracle. New in Panther 4.60.

set_concurrency

Value for the SQL_ATTR_CONCURRENCY ODBC statement handle attribute. Set to SQL_CONCUR_VALUES when connecting to SQL Server. New in Panther 5.10.

Oracle OCI driver

no_utf8_conversion

Can only be set for UTF8 connections. When set, the application must convert character date from and to UTF8. New in Panther 5.40.

utf8*

1 if the UTF8 option was specified in the DECLARE CONNECTION statement for the connection. New in Panther 5.40.

xa_connection*

1 for XA connection; 0 for normal connection.

Oracle Pro*C driver

xa_connection*

1 for XA connection; 0 for normal connection.

Sybase CT Library driver

xa_connection*

1 for XA connection; 0 for normal connection.

*Option is read-only..

See Also

dm_get_connection_option