แก้ไข

แชร์ผ่าน


IDataEnvironment Interface

Definition

Defines an interface to data services that enables control designers to integrate data store or database-related functionality into their design environment.

public interface class IDataEnvironment
public interface IDataEnvironment
type IDataEnvironment = interface
Public Interface IDataEnvironment

Remarks

An object that implements the IDataEnvironment interface can access the data connections available to an application at design time. The IDataEnvironment interface provides methods to list available data connections, create new data connections, retrieve schema information from a connection, and save data-connection configuration information to the application's configuration file.

The IDataEnvironment interface enables you to interact with data connections in the design environment, but it is not intended as a data-management API.

Properties

Connections

Gets a collection of data connections defined in the current design session.

Methods

BuildConnection(IWin32Window, DesignerDataConnection)

Creates a new data connection or edits an existing connection using the design tool's new connection user interface.

BuildQuery(IWin32Window, DesignerDataConnection, QueryBuilderMode, String)

Launches a dialog to build a SQL query string.

ConfigureConnection(IWin32Window, DesignerDataConnection, String)

Writes a connection string to the application's configuration file.

GetCodeExpression(DesignerDataConnection)

Returns a code expression that contains the source code required to retrieve a connection string from the application's configuration file.

GetConnectionSchema(DesignerDataConnection)

Gets the schema for the specified data connection.

GetDesignTimeConnection(DesignerDataConnection)

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

Applies to