Syntax
| string = connectionobject.ConnectionString
connectionobject.ConnectionString = string
|
---|---|
Description
| Sets or returns a string value that contains the details used to create a connection to a data source.
The ConnectionString property can be used to set or return a string that contains the information needed to establish a connection to a data source. The string is typically composed of a series of parameter=value statements that are separated by semicolons. After you complete the connection, the provider may alter these ADO parameter=value statements to the provider equivalents.
Note that the ConnectionString string is also passed as part of the Open method call of the Connection object. The values of ConnectionString parameter of the method call are automatically inherited by the ConnectionString property. Therefore, these values are set by the Open method. (Also, the Open method allows the optional use of a user ID and password.)
ADO supports five arguments for the connection string:
File Name= is the name of a file that contains the connection information. If you use this parameter, you cannot use the Provider= parameter.
Provider= is the name of the provider. If you use this parameter, you cannot use the File Name= parameter.
Remote Provider= is the name of the provider that you use when you open a client-side connection. (for Remote Data Service)
Remote Server= is the path name to the server that you use when you open a client-side connection. (for Remote Data Service)
URL= is the absolute URL address to use for the connection.
Note: Duplicate parameters are ignored and only the last occurrence of a repeated parameter is used.
|
See Also
| |
Example
| Dim objConnection |