12. Understanding .NET Data Provider Connectivity : .NET Data Provider Classes : IngresConnection Class : Connection String Keywords
 
Share this page                  
Connection String Keywords
Keywords for the ConnectionString property of the IngresConnection class are as follows.
Connection string keywords are case-insensitive. Certain keywords have synonyms. For example, keywords Server and Address are synonyms of Host. Spaces in values are retained. Values can be delimited by double quotes.
BlankDate
Specifies how an Ingresdate blank (empty) result value is to be returned to the application:
BlankDate=null
Returns a null value.
BlankDate=default
Returns the default (9999-12-31 23:59:59).
BlankDate=datetime
Returns a .NET DateTime value with the customized BlankDate value. This option lets you specify your own "magic" DateTime value to represent an Ingres blank date. The format of datetime must be yyyy-mm-dd hh:mm:ss [GMT], and the value must be a valid .NET DateTime and Ingresdate value.
If the GMT specification is included, the returned .NET DateTime value is adjusted for the local time zone and returned as a .NET DateTime with DateTimeKind.Local property. For example:
"BlankDate=2099-12-31 12:00:00 GMT;" returns 2099-12-31 12:00:00 GMT converted to local time.
Note:  Be careful if the application does an INSERT or UPDATE of the Ingresdate column. If the column is to contain a blank Ingresdate value, the application must map the DBNull or .NET DateTime value back to the Ingresdate column value of blank date. Applications that specify their own BlankDate "magic" values should be consistent with a value. Failure to INSERT or UPDATE these mapped values properly can lead to an inconsistent, confusing mix of blank dates and various "magic" date values in the database.
Default: 9999-12-31 23:59:59
Character Encoding
Specifies the .NET character encoding name (for example, windows-1252) used for conversions between Unicode and character data types. This keyword allows an alternate .NET character encoding to be specified as an override, or a valid .NET character encoding to be used if the data provider is unable to map the Data Access Server’s installation character set. A code page name can also be specified in “cp” format (for example, “cp1252”).
Connection Lifetime or Connect Lifetime
Specifies an interval, in seconds, that defines the lifetime of the connection. An inactive connection that has existed longer than the specified interval beyond when it was first opened is removed from the connection pool and is closed.
This parameter will increase the number of physical connections required over the life of the system, but allows the system administrator to release connections and system resources, or balance servers regardless of other pool parameters such as Min Pool Size.
Default: 0 (no checking)
Note:  Inactive connections waiting for work for more than 60 seconds are automatically removed from the pool unless the user specifies a Min Pool Size. Removing inactive connections releases system resources to other processes in both the client and server.
Connection Timeout or Connect Timeout
Specifies the time, in seconds, to wait for an attempted connection to time out if the connection has not completed. Default is 15.
Cursor_mode
Specifies the default cursor concurrency mode, which determines the concurrency of cursors that are not explicitly assigned in the command text (for example, FOR UPDATE or FOR READONLY). Options are:
readonly—(Default) Provides non-updatable cursors for best performance
update—Provides updatable cursors
dbms—The DBMS Server assigns the cursor concurrency mode.
Database or DB
Specifies the name of the database being connected to. If a server is required, use the syntax dbname/server_class.
Date_alias
Specifies the alias for the DATE data type. This property is not used directly by the driver but is sent to the DBMS and affects the processing of query text. Options are:
ansidate—Sets ANSIDATE as the alias (default if SendIngresDates is not set or is set to FALSE).
ingresdate—Sets INGRESDATE as the alias (default if SendIngresDates is set to TRUE).
Date_format or Date_fmt
Specifies the Ingres format for date literals. It corresponds to the Ingres environment variable II_DATE_FORMAT and is assigned the same values. This option is not used directly by the data provider, but is sent to the DBMS and affects the parsing of date literals in query text.
Dbms_user
Specifies the user name to be associated with the DBMS session. This name is equivalent to the Ingres –u flag, which can require administrator privileges.
Dbms_password
Specifies the DBMS password of the user, which is equivalent to the Ingres –P flag.
Decimal_char
Specifies the character that the DBMS Server will use to separate fractional and non-fractional parts of a number. It corresponds to the Ingres environment variable II_DECIMAL and is assigned the same values. This option is not used directly by the data provider, but is sent to the DBMS and affects the parsing and construction of numeric literals.
Decimal_char=',' specifies the comma (,) character.
Default: period (.) as in 12.34.
Enlist
Specifies whether the IngresConnection in the transaction context is automatically enlisted if the creation thread is within a transaction context as established by System.EnterpriseServices.ServicedComponent.
Default: true
Group ID
Specifies the group identifier that has permissions for a group of users.
Host or Server or Address
Specifies the name of the target host server machine with the Data Access Server (DAS).
Multiple host names can be specified as a semicolon-separated list enclosed in parentheses with optional port lists:
Server=(hostname1[:port[,port]];hostname2[:port[,port]])
Example connection string:
Server=(myserver1;myserver2);db=mydatabase;
If a port ID is attached to a host name, any additional port IDs outside the list or specified in the PORT keyword are ignored. If a host name does not have an explicit port ID in the specification, then port IDs in the list that follows the PORT keyword are distributed to the hostname. For example:
Host=(myservera:II6;myserverb);Port=II8,II9;Database=mydb;
is equivalent to:
Host=(myservera:II6;myserverb):II8,II9;Database=mydb;
is equivalent to:
Host=(myservera:II6;myserverb:II8;myserverb:II9);Database=mydb;
To maintain performance, the connection string should specify a hostname and port that the DAS servers typically listen to.
Example:
Assume that four DAS servers are started and listening on symbolic ports II7, II8, II9, and II10. The following IngresConnection.ConnectionString will connect a .NET application to the Ingres database using one of the four ports:
Host=myserver;Port=II7,II8,II9,II10;UserID=myuserid;Pwd=mypwd;Database=mydb;
or
Host=myserver:II7,II8,II9,II10;UserID=myuserid;Pwd=mypwd;Database=mydb;
Identifier_Delimiter or IdentifierDelimiter or ID_Delimiter or IDDelimiter
Specifies the character recognized by the data provider to delimit an identifier. Options are:
dquote—(Default) Recognizes only double-quotes.
bracket—Recognizes both double-quotes and brackets. This keyword is for use with products such as Microsoft SQL Server Analysis Services (SSAS), which generate bracket-delimited identifiers in their processing of SQL table and column references.
Max Pool Size
Specifies the maximum number of connections that can be in the pool.
Default: 100
Min Pool Size
Specifies the minimum number of connections that can be in the pool.
Default: 0
Money_format or Money_fmt
Specifies the Ingres format for money literals. It corresponds to the Ingres environment variable II_MONEY_FORMAT and is assigned the same values. This option is not used directly by the data provider, but is sent to the DBMS and affects the processing of query text.
Money_precision or Money_prec
Specifies the precision of money data values. It corresponds to the Ingres environment variable II_MONEY_PREC and is assigned the same values. This option is not used directly by the data provider, but is sent to the DBMS and affects the processing of money values.
Password or PWD
Specifies the password to the database. This value may be case-sensitive depending on the target server.
Persist Security Info
Specifies whether password information from the connection string is returned in a get of the ConnectionString property:
false—(Default) Does not return password information.
true—Returns password information.
Pool Check Interval
Specifies the interval, in seconds, at which inactive connections in the pool that are waiting for work are checked to test if the session is still responsive. Non-responsive connections are closed and removed from the pool.
A value that is too low generates needless query traffic to the DBMS Server. A value that is too high delays detection of non-responsive servers. An interval of 300 seconds may be a reasonable starting value.
Default: 0 (no checking)
Pool Check Timeout
Specifies the time, in seconds, for an inactive connection in the pool to wait on a non-responsive server before timing out and disconnecting. This keyword has no effect if Pool Check Interval is 0.
Default: 5
Pooling
Enables or disables connection pooling:
true—(Default) Enables connection pooling.
false—Disables connection pooling.
Port
Specifies the port number on the target host server machine that the Data Access Server is listening to.
Multiple port numbers, separated by commas, can be specified, one for each configured DAS. For example, "Port=II7,II8,II9,II10;" can be specified if four DAS servers have been configured to listen on each respective port. The data provider attempts to connect to each port, in random order, until a successful connection is made.
Ingres default: II7
Vectorwise default: VW7
Role ID
Specifies the role identifier that has associated privileges for the role.
Role Password or Role PWD
Specifies the role password associated with the Role ID.
SendIngresDates
Specifies whether .NET DateTime parameter data is sent as INGRESDATE data type rather than as ANSI date and time data type. Options are:
false—Sends as ANSI date and time type. (Default if Date_alias is not set or is set to ANSIDATE.)
true—Sends as INGRESDATE type. (Default if Date_alias is set to INGRESDATE.)
For more information, see SendIngresDates Connection Keyword (see page SendIngresDates Connection Keyword).
Timezone or TZ
Specifies the Ingres time zone associated with the client's location. Corresponds to the Ingres environment variable II_TIMEZONE_NAME and is assigned the same values. This information is not used directly by the data provider, but is sent to the DBMS and affects the processing of dates.
User ID or UID
Specifies the name of the authorized user connecting to the DBMS Server. This value may be case-sensitive depending on the target server.
Vnode_usage
Allows the .NET application to control the portions of the vnode information that are used to establish the connection to the remote DBMS server through the Data Access Server. Options are:
connect—(Default) Uses only the vnode connection information.
login—Uses both the vnode connection and login information.
For more information, see User ID Options for the Data Provider (see page User ID Options for the Data Provider).