dotConnect Universal Documentation
Devart.Common Namespace / DbConnectionBase Class / ConnectionString Property

In This Topic
    ConnectionString Property (DbConnectionBase)
    In This Topic
    Gets or sets the string used to open a server connection.
    Syntax
    'Declaration
     
    Public Overrides Property ConnectionString As String
    public override string ConnectionString {get; set;}

    Property Value

    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 System.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.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also