System.Design 2.0.0.0

An object that implements the interface can access the data connections available to an application at design time. The 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 interface enables you to interact with data connections in the design environment, but it is not intended as a data-management API.

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

- Method
  2.0.0.0
  System.ComponentModel.Design.Data.DesignerDataConnection `` ``

  Use the method to activate the design environment's user interface for creating or editing data connections. If the parameter is null, it indicates the user wants to create a new connection. If the parameter is a object, it indicates the user wants to edit an existing connection.

  Your design environment is responsible for creating the data connection, adding the connection either to a global list of connections or to the Web application's configuration file, and adding the new connection to the property.

  The new connection should include the information that the application needs to create a data connection at run time. If you need to use the data connection in the design environment, use the method to return a object that will connect to the data store from the design environment.

  If the user chooses to cancel the new connection creation process, the method should return null.

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

  A new or edited object, or null if the user canceled.

  The parent window for the connection dialog. The connection, if any, to edit. To create a new connection, should be null.
- Method
  2.0.0.0
  System.String `` `` `` ``

  The method launches the design environment's UI for editing or creating SQL query strings. If the parameter is , it indicates the user wants to create a new query. If the parameter contains a string, it indicates the user wants to edit the existing query.

  The parameter indicates the type of query the user wants to build; either select, update, insert, or delete. Your user interface can use the parameter to configure itself for the type of query desired, limit the user to using SQL statements valid only for the type of query desired, and/or validate the query against the desired type.

  Launches a dialog to build a SQL query string.

  A string containing the SQL query, or null if the user canceled.

  The parent window for the dialog. The data connection to use for the query. One of the values. The initial value of the query or to create a new query.
- Method
  2.0.0.0
  System.ComponentModel.Design.Data.DesignerDataConnection `` `` ``

  The method writes a connection to the application's configuration file. The connection string and provider name are written to the connectionStrings configuration element named according to the parameter. The property of the parameter is ignored.

  Implementations of the method should throw the following exceptions.

  Exception

  Reason

  A duplicate name exists in the application's configuration file.

  , , or other appropriate file IO exception.

  The application's configuration file cannot be updated. Your method implementation should throw an appropriate exception.

  The application's configuration file cannot be checked out from the source control system.

  Consider using the configuration-management APIs in the namespace to read and write the application's configuration file. The class will read and write the connectionStrings configuration element.

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

  A object containing the saved connection data with the property set to , and the property set to true.

  The parent window for the dialog, if any. A object containing the connection data to save. The name of the new connection configuration entry.
- Property
  2.0.0.0
  System.Collections.ICollection To be added.

  The property returns the set of connections available at design time. Your implementation of the property can return either the list of connections defined in the current Web application, or a list of connections defined at a global level, such as a list of data connections maintained by the design environment.

  Each connection in the collection should have a unique connection string. If your collection includes both connections from the application's configuration file and global connections, your implementation must handle the case where connections from the global list and the configuration file have the same connection string. In this case, it is recommended that you eliminate duplicates and use the configuration-file connection only.

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

- Method
  2.0.0.0
  System.CodeDom.CodeExpression `` To be added.

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

  A object containing the source code required to retrieve a connection string from the application's configuration file.

  The connection to retrieve from the application's configuration file.
- Method
  2.0.0.0
  System.ComponentModel.Design.Data.IDesignerDataSchema ``

  The method returns the database schema for the specified data connection. If the schema is unavailable, or if the provider for the connection is unavailable, the should return null.

  Gets the schema for the specified data connection.

  An object containing the schema information for the specified data connection, or null if no schema information is available.

  The data connection for which to return schema information.
- Method
  2.0.0.0
  System.Data.Common.DbConnection ``

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

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

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

  A object that can be used at design time.

  The desired data connection.