ConnectionStore.GetConnection 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
创建现有连接的副本。
重载
GetConnection() |
创建现有连接的副本。 此类不能被继承。 |
GetConnection(Boolean) |
检索在此对象中使用的连接。 此类不能被继承。 |
GetConnection()
创建现有连接的副本。 此类不能被继承。
public:
virtual System::Data::IDbConnection ^ GetConnection();
public System.Data.IDbConnection GetConnection ();
abstract member GetConnection : unit -> System.Data.IDbConnection
override this.GetConnection : unit -> System.Data.IDbConnection
Public Function GetConnection () As IDbConnection
返回
返回现有连接的副本。
实现
适用于
GetConnection(Boolean)
检索在此对象中使用的连接。 此类不能被继承。
public:
virtual System::Data::IDbConnection ^ GetConnection(bool newConnection);
public System.Data.IDbConnection GetConnection (bool newConnection);
abstract member GetConnection : bool -> System.Data.IDbConnection
override this.GetConnection : bool -> System.Data.IDbConnection
Public Function GetConnection (newConnection As Boolean) As IDbConnection
参数
- newConnection
- Boolean
true
成功;否则,为 false
.
返回
SQLServerConnection 对象。