Before creating SQL queries using OpenESQL Assistant, you can set options that determine the behavior of the OpenESQL Assistant and specify how it generates SQL. Do this using the OpenESQL Assistant Configuration Options dialog box.To do this, click Tools > Options; then expand Micro Focus Visual COBOL and click OpenESQL Assistant. You can set the following options:
Set this option before connecting to a data source. You also can also set the following to further configure ADO.NET mode:
When using the ADO.NET runtime (i.e., compiling programs with the SQL(DBMAN-ADO directive), set the Type COBOL Variable option to Object for better performance.
Set this option to -1 to display all rows when running a query.
Select one of three statement types:
By default, OpenESQL Assistant is not docked to Visual Studio. Set this option to True if you want OpenESQL Assistant to start docked to Visual Studio.
By default, OpenESQL Assistant does not prompt you when disconnecting from a data source. If you want to be prompted to save a query you have built before disconnecting, set this option to True. Otherwise, you could lose the query.
By default, OpenESQL Assistant displays all tables in the tree view and builds all queries unqualified. However, if the data source has multiple tables with the same table name, you can set OpenESQL Assistant to show table names in the tree view with their owner names immediately following in parenthesis. Queries performed also return table names qualified with the owner name.
By default, OpenESQL Assistant does not enclose column and table names with the quote identifier associated with the data source unless the column or table name contains embedded blanks, a special character such as $, or DBCS characters. You can set OpenESQL Assistant to enclose all table and column names with the appropriate quote identifier by setting this option to True.
By default, OpenESQL Assistant generates SQL statements using SQLCODE checking. You change this to set OpenESQL Assistant to generate SQL statements using SQLSTATE checking instead.
By default, OpenESQL Assistant generates SQL statements for use by any application. You can also set OpenESQL to generate SQL statements that can be used as as Web service.
By default, OpenESQL Assistant generates EXEC SQL statements. However, you can change it to build EXEC ADO statements if you want to build EXEC ADO queries, and if you want to generate EXEC ADO Disconnected or Connected statements as auxiliary code. .
By default, OpenESQL Assistant generates SQL queries and copybooks using a combination of upper and lower case. You can also set OpenESQL Assistant to generate in all uppercase or all lowercase.
By default, OpenESQL Assistant only returns the first 50 rows when you run a query. This is to prevent queries from returning huge numbers of rows, potentially crashing your machine or overloading your network. However, you can set the maximum number of rows returned to a number of your choice. Set this value to -1 if you want all rows returned. We recommend that you choose the number based on the amount of data you expect to be returned, or based on your testing needs.
By default, OpenESQL Assistant generates a host variable as a PIC X(n) field for VARCHAR columns. When data is mapped to the host variable, it is null terminated. However, you can set OpenESQL Assistant to generate the host variable with two level-49 variables; one for the length of the data mapped and one for the actual text data.
By default, OpenESQL Assistant generates COBOL host variables using COBOL definitions where appropriate. You can set this option to SQL TYPE to enable the SQL precompiler to better determin host variable usage, or set it to OBJECT to provide better performance for .NET applications.
By default, OpenESQL Assistant generates the structure name for the copybook as DCLtablename. You can also generate the structure name using just the table name or you can supply your own structure name as long as it is a valid COBOL name. OpenESQL Assistant converts all underscores into hyphens. You set this option to Other, specify your own structure in the DCLGEN > User Defined Structure Name field.
By default, OpenESQL Assistant creates host variables using a combination of the column name and a prefix of the table name, converting all underscores to hyphens to create a valid COBOL name. You can also set OpenESQL Assistant to always generate host variables using only the column name (no prefix) or to use an alphabetic character prefix. Host variables generated with alphabetic character prefixes use "A" for the first table selected, "B" for the second table, etc.
By default, OpenESQL Assistant generates indicator variables at the end of a copybook. You can also set OpenESQL Assistant to generate indicator variables after each host variable instead. Your third option is to set OpenESQL Assistant so that no indicator variables are generated.
If you are using ADO.NET mode and you choose not to specify a user ID or password here, OpenESQL Assistant prompts you for your user ID and password when connecting to a data source. Depending on how you define your connection names in the ADO.NET Connection Editor, you have the option of saving your login user name and password.
See your Visual Studio documentation for information on setting properties.