ODAC

TCustomDAConnection.ConnectString Property

Used to specify the connection information, such as: UserName, Password, Server, etc.

Class

TCustomDAConnection

Syntax

property ConnectString: string stored False;

Remarks

ODAC recognizes an ODBC-like syntax in provider string property values. Within the string, elements are delimited by using a semicolon. Each element consists of a keyword, an equal sign character, and the value passed on initialization. For example:

Server=London1;User ID=nancyd

Connection parameters

The following connection parameters can be used to customize connection:
Parameter Name Description
LoginPrompt Specifies whether a login dialog appears immediately before opening a new connection.
Pooling Enables or disables using connection pool.
ConnectionLifeTime Used to specify the maximum time during which an opened connection can be used by connection pool.
MaxPoolSize Used to specify the maximum number of connections that can be opened in connection pool.
MinPoolSize Used to specify the minimum number of connections that can be opened in connection pool.
Validate Connection Used for a connection to be validated when it is returned from the pool.
Server Serves to supply the server name for login.
Username Used to supply a user name for login.
Password Used to supply a user name for login.
Charset Used to set the character set that ODAC uses to read and write character data.
UseUnicode Used to enable or disable Unicode support.
Port Used to specify the port number for the connection. Available in Direct Mode only.
ConnectionTimeout Used to specify the amount of time before an attempt to make a connection is considered unsuccessful.
Direct Used for ODAC to connect directly over TCP/IP (in Direct mode) and without requiring Oracle software on the client side.
IPVersion Used to specify the version of the Internet Protocol.
SID Used to specify the security identifier.
ServiceName Used to specify the name of the service.
ConnectMode Used to specify the system privileges to use when a user connects to the server.
HomeName Used to select the Oracle client to use with the application.
Schema Used to change the current schema of the session to the specified schema.

Old-style conenction string

The old connection string format is also supported:

user_name/passwd@database

where: user_name - username for logging in to the server; passwd - password to log in; database - the database alias from the tnsnames.ora file.

EZCONNECT connection string

ODAC also supports Oracle's easy connect naming method . An example of EZCONNECT connection string:

username/password@host:port/service_name

See Also

© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback