IDataEnvironment::BuildQuery Method (IWin32Window^, DesignerDataConnection^, QueryBuilderMode, String^)
Launches a dialog to build a SQL query string.
Assembly: System.Design (in System.Design.dll)
String^ BuildQuery( IWin32Window^ owner, DesignerDataConnection^ connection, QueryBuilderMode mode, String^ initialQueryText )
Parameters
- owner
-
Type:
System.Windows.Forms::IWin32Window^
The parent window for the dialog.
- connection
-
Type:
System.ComponentModel.Design.Data::DesignerDataConnection^
The data connection to use for the query.
- mode
-
Type:
System.ComponentModel.Design.Data::QueryBuilderMode
One of the QueryBuilderMode values.
- initialQueryText
-
Type:
System::String^
The initial value of the query or Empty to create a new query.
The BuildQuery method launches the design environment's UI for editing or creating SQL query strings. If the initialQueryText parameter is Empty, it indicates the user wants to create a new query. If the initialQueryText parameter contains a string, it indicates the user wants to edit the existing query.
The mode parameter indicates the type of query the user wants to build; either select, update, insert, or delete. Your user interface can use the mode 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.
Available since 2.0