Επεξεργασία

Κοινή χρήση μέσω


IDataEnvironment.GetDesignTimeConnection(DesignerDataConnection) Method

Definition

Gets a database connection that can be used at design time.

public:
 System::Data::Common::DbConnection ^ GetDesignTimeConnection(System::ComponentModel::Design::Data::DesignerDataConnection ^ connection);
public System.Data.Common.DbConnection GetDesignTimeConnection (System.ComponentModel.Design.Data.DesignerDataConnection connection);
abstract member GetDesignTimeConnection : System.ComponentModel.Design.Data.DesignerDataConnection -> System.Data.Common.DbConnection
Public Function GetDesignTimeConnection (connection As DesignerDataConnection) As DbConnection

Parameters

connection
DesignerDataConnection

The desired data connection.

Returns

A DbConnection object that can be used at design time.

Remarks

The GetDesignTimeConnection method returns a valid, open connection to the data store that can be used by the control designer.

Control designers should use the GetDesignTimeConnection to obtain a data connection and should not attempt to open a connection using the ConnectionString property.

Applies to