See Also

DbConnectionBase Class  | DbConnectionBase Members

Language

Visual Basic

C#

Show All

See AlsoLanguagesDevart.Data.OracleSend comments on this topic.

ConnectionString Property

Devart.Common Namespace > DbConnectionBase Class : ConnectionString Property (DbConnectionBase)

Gets or sets the string used to open a server connection.

[Visual Basic]
Overrides Public Property ConnectionString As String
[C#]
public override string ConnectionString {get; set;}

Return Type

The connection string that includes the source database name, and other parameters needed to establish the initial connection. The default value is an empty string ("").

Remarks

When ConnectionString property is assigned a value, connection closes. The connection string is parsed immediately after being set. If errors in syntax are found when parsing, a runtime exception, such as ArgumentException, is generated. Other errors can be found only when an attempt is made to Open the connection.

The ConnectionString is similar to an OLE DB connection string. Values may be delimited by single or double quotes, (for example, name='value' or name="value"). Either single or double quotes may be used within a connection string by using the other delimiter, for example, name="value's" or name= 'value"s', but not name= 'value's' or name= ""value"". All blank characters, except those placed within a value or within quotes, are ignored. Keyword value pairs must be separated by a semicolon (;). If a semicolon is part of a value, it also must be delimited by quotes. No escape sequences are supported. The value type is irrelevant. Names are not case sensitive.

If a given name occurs more than once in the connection string, the value associated with the last occurrence is used.

See Also

DbConnectionBase Class  | DbConnectionBase Members

 

 


© 2002 - 2013 Devart. All Rights Reserved.