IDataEnvironment::GetDesignTimeConnection Method (DesignerDataConnection^)

 

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

Namespace:   System.ComponentModel.Design.Data
Assembly:  System.Design (in System.Design.dll)

DbConnection^ GetDesignTimeConnection(
	DesignerDataConnection^ connection
)

Parameters

connection
Type: System.ComponentModel.Design.Data::DesignerDataConnection^

The desired data connection.

Return Value

Type: System.Data.Common::DbConnection^

A DbConnection object that can be used at design time.

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.

.NET Framework
Available since 2.0
Return to top
Show: