Making an SQL specification

You use a Select, Modify, or ProcedureCall bean to access relational data. Use the SQL page of the data property editor to specify the SQL statement for the bean. You can create a new SQL specification or select an existing SQL specification. When you create an SQL specification, you have the option of composing it manually in an SQL editor or you can use the SQL Assist SmartGuide, to help you compose it.

When you create an SQL specification, you identify a database access class to hold the SQL specification definition. Different Select beans can use the same SQL specification. The same is true for Modify and ProcedureCall beans.


SQL page of Query window

  1. Select a database access class from the drop-down list in the Database Access Class field. The list shows the database access classes that exist in the workspace. The format of each item in the list is packagename.classname, where packagename is the name of the package that contains the database access class, and classname, is the name of the class.

    To define a new database access class and add it to the Database Access Class list, select New. See "Defining a database access class".

  2. Select an SQL specification from the SQL list. The list identifies the SQL specifications that are in the selected database access class. If you are editing a Query property, only specifications of queries are shown, likewise for Procedure properties and Action properties.

    To add an SQL specification to the database access class, select Add.

    To edit an SQL specification, select the SQL specification name in the SQL list and then select Edit.

    To remove an SQL specification from the SQL list, select it in the list and then select Remove.

When you finish making the SQL specification, select OK.

To cancel making an SQL specification, select Cancel.


Related procedures
Defining a database access class
Making a new SQL specification
Composing or editing an SQL specification
Specifying a connection alias