Mono Class Library: System.Data.SqlClient.SqlConnection Overview | Members

System.Data.SqlClient.SqlConnection.DataSource Property

Gets the current SQL Server that the System.Data.SqlClient.SqlConnection references.

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.Browsable(true)]
public override string DataSource { get; }

Value

Gets a string value representing the current SQL Server instance.

Remarks

Gets the current DataSource the System.Data.SqlClient.SqlConnection instance references. The DataSource is the SQL Server network address and (optionally) data port.

The SqlConnection.DataSource can be set in the Connection String by denoting it with one of the following key names: "data source", "server", "address", "addr", or "network address".

Requirements

Namespace: System.Data.SqlClient
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0