Setting EGL SQL preferences

When you are developing code, you can use the SQL retrieve feature to create a Record type from the columns of an SQL table.

For details on creating the Record type, see Retrieving SQL table data into a Record type.

To set preferences for the SQL retrieve feature, do as follows:

  1. From the main menu, click Window > Preferences. The Preferences window is displayed.
  2. In the Preferences menu, expand EGLand click SQL. The SQL pane is displayed.
  3. In the SQL pane, specify the rules for creating each record field that the SQL retrieve feature creates:
    1. Specify the case of the record field name:
      • Do not change case (the default) means that the case of the record field name is the same as the case of the related table column name.
      • Change to lower case means that the record field name is a lowercase version of the table column name.
      • Change to lower case and capitalize first letter after underscore also means that the record field name is a lowercase version of the table column name, except that a letter in the record field name is rendered in uppercase if, in the table column name, the letter immediately follows an underscore.
    2. Specify how the underscores in the table column name are reflected in the record field name:
      • Do not change underscores (the default) means that underscores in the table column name are included in the record field name.
      • Remove underscores means that underscores in the table column name are not included in the record field name.
    3. Specify which types are specified for the EGL fields that correspond to SQL date and timestamp columns:
      • Use EGL date, time, and timestamp is the default.
      • Use EGL type string uses EGL String fields.

        The value Set sqlDataCode on char, Unicode, and string fields is not in use.

  4. If you want new SQL records to have the ID annotation set, select Retrieve primary key information from the system catalog.
  5. If you want to be prompted for a database password if you did not supply one when you created the connection in the workbench, select Prompt for SQL user ID and password when needed.
  6. To save the changes and remain in the Preferences window, click Apply. To save the changes and exit the window, click OK. To cancel the changes and exit the window, click Cancel.