Connection Object
A Connection object represents a unique session with a data source. In the case of a client/server database system, it may be equivalent to an actual network connection to the server.
In addition to the standard ADO properties, these dynamic properties are added to the Properties collection of the Connection object.
Dynamic Properties
Provider-Specific Connection Parameters
The Microsoft OLE DB Provider for SQL Server (SQLOLEDB), supports several provider-specific connection parameters in addition to those defined by ADO. As with the ADO connection properties, these provider-specific properties can be set using the ConnectionString property of the Connection object.
Parameter | Description |
---|---|
Trusted_Connection | Indicates the user authentication mode. This can be set to Yes or No. The default value is No. If this property is set to Yes, SQLOLEDB uses Microsoft Windows Authentication (recommended) to authorize user access to the Microsoft® SQL Server™ database specified by the Location and Datasource property values. If this property is set to No, SQLOLEDB uses Mixed Mode to authorize user access to the SQL Server database. The SQL Server login and password are specified in the User ID and Password properties. |
Current Language | Indicates a SQL Server language name. Identifies the language used for system message selection and formatting. The language must be installed on the computer running SQL Server; otherwise, opening the connection will fail. |
Network Address | Indicates the network address of the instance of SQL Server specified by the Location property. |
Network Library | Indicates the name of the network library (DLL) used to communicate with the SQL Server. The name should not include the path or the .dll file name extension. The default is provided by the SQL Server client configuration. |
Use Procedure for Prepare | Determines whether SQL Server creates temporary stored procedures when commands are prepared using the Prepared property. |
Auto Translate | Indicates whether OEM/ANSI characters are converted. This property can be set to True or False. The default value is True. If this property is set to True, SQLOLEDB performs OEM/ANSI character conversion when multibyte character strings are retrieved from, or sent to, SQL Server. If this property is set to False, SQLOLEDB does not perform OEM/ANSI character conversion on multibyte character string data. |
Packet Size | Indicates a network packet size in bytes. The packet size property value must be from 512 through 32767. The default SQLOLEDB network packet size is 4096. |
Application Name | Indicates the client application name. |
Workstation ID | A string identifying the workstation. |