Using connection parameters

Following is a list of connection parameters other than from the DSN parameter that can be supplied to the ASE ODBC Driver.

Table 2-1: Connection parameters

Property names

Description

Required

Default value

UID, UserID

A case-sensitive user ID required to connect to the ASE server.

Yes

Empty

PWD, Password

A case-sensitive password to connect to the ASE server.

No, if the user name does not require a password

Empty

Server

The name or IP address of the ASE server.

Yes

Empty

Port

The port number of ASE server.

Yes

Empty

AnsiNull

Strict ODBC compliance where you cannot use “= NULL.” Instead, you must use “IsNull.”

No

1

ApplicationName

The name used by ASE to identify the client application.

No

Empty

BufferCacheSize

Keeps the input / output buffers in pool. When large results will occur, increase this value to boost performance.

No

20

CharSet

The designated character set. On Windows, the ASE ODBC Driver by default negotiates the same default Character set as the ASE server. The default Character set is ServerDefault.On Linux the ASE ODBC Driver uses the Client's Character set based on the environment. If you want to use the ASE server's Character Set, you must specify it in the connection properties with Charset=ServerDefault. The default Character set is ClientDefault. See the section titled “Character sets”.

No

Empty

ClientHostName

The name of the client host passed in the login record to the server.

No

Empty

ClientHostProc

The identity of client process on this host machine passed in the login record to the server.

No

Empty

CRC

By default, the driver returns the total records updated when multiple update statements are executed in a stored procedure. This count will also include all updates happening as part of the triggers set on an update or an insert.

Set this property to 0 if you want the driver to return only the last update count.

No

1

Database

The database to which you want to connect.

No

Empty

DataIntegrity

Enables Kerberos Data Integrity.

No

0 (disabled)

DSPassword

The password used to authenticate on the LDAP server, if the LDAP server does not allow anonymous access. The password can be specified in the Directory Service URL (DSURL) as well.

No

Empty

DSPrincipal

The user name used to authenticate on the LDAP server, if the LDAP server does not allow anonymous access. The principal can be specified in the DSURL as well.

No

Empty

DSURL

The URL to the LDAP server.

No

Empty

DTCProtocol (Windows only)

Allows the driver to use either an XA protocol or OleNative protocol when using distributed transactions. See “Using Distributed Transactions”, in Chapter 3, “ASE Advanced Features.”

No

XA

DynamicPrepare

When set to 1, the driver sends SQLPrepare calls to ASE to compile/prepare. This can boost performance if you use the same query repeatedly.

No

0

EnableServerPacketSize

Allows ASE server versions 15.0 or later to choose the optimal packet size.

No

1

EncryptedPassword

Specifies whether password is transmitted in an encrypted format:

  • 0 – Use plain text password.

  • 1 – Use encrypted password. If it is not supported, return an error message.

  • 2 – Use encrypted password. If it is not supported, use plain text password.

NoteWhen password encryption is enabled, and the server supports asymmetric encryption, this format is used instead of symmetric encryption.

No

0

Encryption

The designated encryption. Possible values: ssl.

No

Empty

FetchArraySize

Specifies the number of rows the driver retrieves when fetching results from the server.

No

25

HASession

Specifies if high availability is enabled. 0 indicates high availability disabled, 1 high availability enabled.

No

0

IgnoreErrorsIfRS Pending

Specifies whether the driver is to continue processing or stop if error messages are present. When set to 1, the driver will ignore errors & continue processing the results if more results are available from the server. When set to 0, the driver will stop processing the results if an error is encountered even if there are results pending

No

0

UseCursor

Specifies whether cursors are to be used by the driver. 0 indicates do not use cursors, and 1 indicates use cursors.

No

0

Language

The language in which ASE returns error messages.

No

Empty – ASE uses English by default

LoginTimeOut

Number of seconds to wait for a login attempt before returning to the application. If set to 0, the timeout is disabled, and a connection attempt waits for an indefinite period of time.

No

10

MutualAuthentication

Enables Kerberos Mutual Authentication.

No

0 (disabled)

oldpassword

The current password. If oldpassword contains a value that is not null or an empty string, the current password is changed to the value contained in pwd.

No

Empty

pwd

Contains the new password entered by the user. If the oldpassword property does not exist or is null, pwd contains the value of the current password.

No

Empty

PacketSize

The number of bytes per network packet transferred between ASE and the client.

No

Server determined when driver is connected to ASE 15.0 or later. For older ASE servers, the default is 512.

QuotedIdentifier

Specifies if ASE treats character strings enclosed in double quotes as identifiers:

  • 0 = do not enable quoted identifiers

  • 1 = enable quoted identifiers

No

0

ReplayDetection

Enables Kerberos Replay Detection.

No

0

RestrictMaximum PacketSize

If the you have memory constraints when EnableServerPacketSize is set to 1, then set this property to an int value in multiples of 512 to a maximum of 65536.

No

0

SecondaryPort

The port number of the ASE server acting as a failover server in an active-active or active-passive setup.

Yes, if HASession is set to 1.

Empty

SecondaryServer

The name or the IP address of the ASE server acting as a failover server in an active-active or active-passive setup.

Yes, if HASession is set to 1.

Empty

ServerInitiated Transactions

When SQL_ATTR_AUTOCOMMIT is set to “1” Adaptive Server starts managing transactions as needed. The driver issues a “set chained on” command on the connection. Older ODBC Drivers do not use this feature and manage the job of starting transactions by calling begin tran. Set this property to “0” if you want to maintain the old behavior or require that your connection not use “chained” transaction mode.

No

1

TextSize

The maximum size of binary or text data that will be sent over the wire.

No

Empty – ASE default is 32K.

TightlyCoupled Transaction (Windows only)

When using distributed transactions, if you are using two DSNs which connect to the same ASE server, set this to 1. See “Using Distributed Transactions”, in Chapter 3, “ASE Advanced Features.”

No

0

TrustedFile

If encryption is set to ssl, this property should be set to the path to the Trusted File.

No

Empty