At EGL declaration
time, you can use the SQL retrieve feature
to create an SQL record from the columns of an SQL table.
To set preferences for the
SQL retrieve feature:
- Select , expand EGL and
then click SQL
- Specify the rules for
creating each structure field that the SQL
retrieve feature creates:
- To specify the EGL type to use when
you create a record field
from an SQL character data type, select one of the following radio
buttons:
- Use EGL type string: (the default)
maps
SQL char data types to EGL string data types
- Use
EGL type limited-length string: maps
SQL char data types to EGL limited-length string data types
- Use
EGL type char: maps SQL char data types
to EGL char data types
- Use EGL type mbChar:
maps SQL char data
types to EGL mbChar data types
- Use EGL type Unicode:
maps SQL char data
types to EGL Unicode data types
- To specify the EGL
type to use when you create a record field
from an SQL national character data type, select one of the following
radio buttons:
- Use EGL type dbChar:
(the default) maps
the SQL type to EGL dbChar data types
- Use EGL type
Unicode: maps the SQL type
to EGL Unicode data types
- Use EGL type string:
maps the SQL type
to EGL string data types
- Use EGL type limited-length
string: maps
the SQL type to EGL limited-length string data types
- To
specify the case of the record field name, select one of the
following radio buttons:
- Do not change case:
(the default) the case
of the structure field name is the same as the case of the related
table column name
- Change to lower case:
the structure field
name is a lowercase version of the table column name
- Change
to lower case and capitalize first letter after
underscore: the structure field name is a lower-case version
of the table column name; however, a letter in the structure field
name is rendered in uppercase if, in the table column name, the letter
immediately follows an underscore
- To specify how
the underscores in the table column name are reflected
in the record field name, select one of the following radio buttons:
- Do not change underscores: (the default)
underscores in the table column name are included in the structure
field name
- Remove underscores: underscores
in the
table column name are not included in the structure field name
- If you want new SQL records to be compatible with COBOL
programs
(that is, to have fixed records with level numbers for structure items,
and to use CHAR instead of STRING primitive types), select Add
level numbers to record definition.
- If you want
new SQL records to have the key field property set,
select Retrieve primary key information from the system
catalog.
- If you want to be prompted for a database
password if you did
not supply one for the connection on the SQL Database Connections
page, select Prompt for SQL user ID and password when needed.
- To save your changes and remain in the Preferences window, click Apply.
To save your changes and exit the window, click OK.