Export (0) Print
Expand All

IDbConnection.ConnectionString Property

Gets or sets the string used to open a database.

Namespace: System.Data
Assembly: System.Data (in system.data.dll)

property String^ ConnectionString {
	String^ get ();
	void set (String^ value);

/** @property */
String get_ConnectionString ()

/** @property */
void set_ConnectionString (String value)

function get ConnectionString () : String

function set ConnectionString (value : String)

Property Value

A string containing connection settings.

The ConnectionString property can be set only while the connection is closed.

The following example creates an instance of a derived class, OleDbConnection, sets its ConnectionString, and displays its State..

No code example is currently available or this language may not be supported.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft