Gets or sets the string used to open a data store.
[Visual Basic] Overridable Public Property ConnectionString As String [C#] public string ConnectionString {override get; override set;} [C++] public: __property virtual String* get_ConnectionString(); public: __property virtual void set_ConnectionString(String*); [JScript] public function get ConnectionString() : String; public function set ConnectionString(String);
The OLEDB provider connection string, when the connection is open. The user connection string, when the connection is closed. The default value is an empty string.
The string can only be set when the connection state is closed.
The following example shows how to create a connection and set many of its properties.
ADOConnection Class | ADOConnection Members | System.Data.ADO Namespace | ConnectionTimeout | Database | IsolationLevel | DataSource | UserID | Password