Certain EXEC ADO statements require a significant amount of user input to build them correctly. When you use the OpenESQL Assistant Auxiliary Code tab to generate one of these statements, you invoke a wizard that walks you through the various options for that statement.
The statements generated by these wizards are very similar to the EXEC ADO DELETE, INSERT, SELECT, and UPDATE statements except that you cannot execute them from the OpenESQL Assistant. Because the Wizards need table and column names to work correctly, you must create a query first.
OpenESQL Assistant provides the following wizards for use in generating auxiliary code:
Use this wizard to build a WHERE clause that limits what values to delete from a data source when the data source is updated. The wizard provides a page similar to the Search Criteria tab. It is not necessary for you to supply a Target type or Value because these are dependent upon the column selected.
Embed the generated TO DELETE USE statement into your program after an EXEC ADO PREPARE TO UPDATE statement and before the EXEC ADO UPDATE DATASOURCE statement.
Use this wizard to limit the number of rows and columns that are returned from the data source when the EXEC ADO FILL DATASET statement is executed. The wizard provides pages that enable you to:
For the generated statement to work properly you must have DECLARE DATATABLE and DECLARE DATASET statements coded into your program, and you must embed the TO FILL USE statement into your program after a PREPARE TO FILL statement.
The ConnectedDemo application provided by Micro Focus shows detailed examples of using the TO FILL USE statement in an application. For more information, see the section Demonstration Projects in the chapter Using OpenESQL with ADO.NET.
Use this wizard limit what values to insert into a data source when the data source is updated. The wizard provides pages that enable you to:
You should opt to generate this clause if you want data to be returned to your application after updating a data source with newly inserted rows.
You can specify these only if you have opted to generate the WITH REFRESH clause. The pre-defined source value “@@IDENTITY” is provided to work with Microsoft SQL Server data providers.
Embed this statement into your program after an EXEC ADO PREPARE TO UPDATE statement and before the EXEC ADO UPDATE DATASOURCE statement.
Use this wizard to generate an EXEC ADO TO REFRESH statement to update values in your dataset after updating the data source. Generate this statement in lieu of placing the REFRESH clause in TO INSERT or TO UPDATE EXEC ADO statements. The wizard provides one page that enables you to specify the source data and column you want to return. The pre-defined source value “@@IDENTITY” is provided to work with Microsoft SQL Server data providers.
Embed this statement into your program after an EXEC ADO PREPARE TO UPDATE statement and before the EXEC ADO UPDATE DATASOURCE statement.
Use this wizard to limit what columns and values to update to a data source. The wizard provides pages that enable you to:
You should opt to generate this clause if you want data to be returned to your application after updating a data source with new values.
It is not necessary for you to supply a Target type or Value when building your WHERE clause because these are dependent upon the column selected.
You can specify these only if you have opted to generate the WITH REFRESH clause. The pre-defined source value “@@IDENTITY” is provided to work with Microsoft SQL Server data providers.
Embed this statement into your program after an EXEC ADO PREPARE TO UPDATE statement and before the EXEC ADO UPDATE DATASOURCE statement.