Programming Guide



dm_set_driver_option

Sets a database driver option

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

engine
The name of the engine.

option
The option to be set.

value
The option's new value.

Returns

Description

dm_set_connection_option sets a database engine's generic connection options to a new value. See Table 5-6 for a list of the values of option that are supported.

Table 5-6 Driver options by driver

Option Value

Informix driver

select_numeric_as_string

Set to nonzero to select numeric values as strings to avoid rounding errors. New in Panther 5.00.

ODBC driver

enable_mars

When used with a Microsoft SQL Server ODBC driver, enables the MARS (Multiple Active Result Sets) feature. New in Panther 5.20.

extended_fetch

When zero, the ODBC SQLExtendedFetch function will not be used even if it is supported by the driver. New in Panther 4.50.

force_date_convert

When set, date fields will be bound with the ODBC date format rather as strings. New in Panther 4.60.

long_escape_seq

ODBC uses escape sequences to add certain features such as date literals to SQL. These escape formats have two formats, long and short. Long escape sequences are deprecated in ODBC 3.

new_date_binding

If set (the default), date fields will be bound depending on their date format. If not set, date fields will always be bound with the date/time format.

no_more_rows_value

If not zero (the default), @dmengerrcode will be set to this value when @dmretcode is set to DM_NO_MORE_ROWS. New in Panther 5.51.

Oracle OCI driver

blank_as_null

The OCI Library treat the null string '' as the NULL value. By default, this driver uses the string ' ' instead to keep this from happening. 0 does this; 2 uses ''; any other value used NULL.

neg_err_mode

When set, positive error codes other than END_OF_FETCH are returned as negative error codes. This option affects the value of @dmengerrcode when an engine error is reported.

select_numeric_as_double

Set to nonzero to select values as doubles when retrieving numeric arrays from stored procedures. New in Panther 5.00.

select_numeric_as_string

Set to nonzero to select numeric values as strings to avoid rounding errors. New in Panther 4.10.

v2_mode

Use old Oracle error codes if not 0. For backwards compatibility with older JAM code.

Oracle Pro*C driver

blank_as_null

The Pro*C Library treat the null string '' as the NULL value. By default, this driver uses the string ' ' instead to keep this from happening. 0 does this; 2 uses ''; any other value uses NULL.

select_numeric_as_double

Set to nonzero to select values as doubles when retrieving numeric arrays from stored procedures. New in Panther 5.00.

select_numeric_as_string

Set to nonzero to select numeric values as strings to avoid rounding errors. New in Panther 4.10.

Sybase CT Library driver

expand_bind

Who will expand bind markers in SQL statements: 0 Sybase expands bind markers (default); 1 Panther will expand bind markers if Sybase cannot; 2 Panther will expand bind markers.

old_display_lengths

Compatibility for column widths with the CATQUERY command before Panther 4.10: 0 DB Library compatible; 1 older version compatible.

xa_connection*

Type of the default connection: 1 for XA connection; 0 for normal connection; -1 if no connection.

Sybase DB Library driver

allow_password_change

Normally the DECLARE CONNECTION will fail if the password has expired. Setting this option to 1 will allow the connection so that the Sybase sp_password script can be run. New in Panther 5.10.

msg_severity_threshhold

Normally severity 10 Sybase server messages are treated by the driver as fatal errors. Setting this option to 11 will change this behavior. See the Sybase documentation for more information.

secure_login

Set to non-zero to encrypt the password in DECLARE CONNECTION processing. New in Panther 5.40.

*Option is read-only..

See Also

dm_get_driver_option