f2s_mssql_connection_option¶

Applies to: MS SQL

Syntax

set_attribute f2s_mssql_connection_option of {DriverID} {option} to {variable}
get_attribute f2s_mssql_connection_option of {DriverID} {option} to {variable}

Parameter

Description

DriverID

The ID of the driver for which this applies. In most cases, you should use _f2s_ActiveDriverID.

option

Pointer to a string. The connection option to get or set (use f2s_ConstPointer function - see example)

variable

A string variable to hold the retrieved value of the connection option

Description

Getting this attribute returns the value of the connection option. Setting this attribute sets the value of the connection option. If the option has not been set, attempting to get this attribute will throw a Com Object Invocation error. The connection object will only be set for the current connection.

Only options that are not used internally by the driver can be gotten or set. Connection options that CANNOT be set or retrieved are:

Option

Use Attribute

Database

f2s_table_sql_name

Server

f2s_table_server_name

FailOverPartner

Cannot be set

MarsConn

Cannot be set

UID

Set in login

PWD

Set in login

Trusted_Connection

Set in login

wsid

Cannot be set

app

AutoTranslate

Timeout

f2s_mssql_lock_timeout

Examples

get_attribute

string sOption

Set_Attribute f2s_mssql_connection_option of _f2s_ActiveDriverId (f2s_ConstPointer("ApplicationIntent")) to "ReadOnly"

Get_Attribute f2s_mssql_connection_option of _f2s_ActiveDriverId (f2s_ConstPointer("ApplicationIntent")) to sOption

Showln (SFormat("The Application Intent is set to %1.", sOption)) //this should print ReadOnly

set_attribute

Set_Attribute f2s_mssql_connection_option of _f2s_ActiveDriverId (f2s_ConstPointer("ApplicationIntent")) to "ReadOnly"

Related Attributes

f2_mssql_conn_option_reset - command

Replaces: Commands SET_CONNECTION_OPTION and GET_CONNECTION_OPTION