IDataEnvironment.GetDesignTimeConnection(DesignerDataConnection) Method

Definition

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

C#
public System.Data.Common.DbConnection GetDesignTimeConnection(System.ComponentModel.Design.Data.DesignerDataConnection connection);

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

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1