You
can use a wizard to add an SQLJ connection declaration clause
to an SQLJ file. An SQLJ connection clause declares a connection to
a data
source in an SQLJ application program.
Prerequisite: The
SQLJ file must be open in the SQLJ editor.
You
can insert an SQLJ connection declaration clause anywhere
in an SQLJ file that a Java™ class
definition can appear in a Java program.
To
add an SQLJ connection declaration clause:
- In the open SQLJ file, place the cursor at the location in the
code where you want to add the SQLJ connection declaration clause.
- Right-click at the insertion point, and then click on the pop-up menu.
- On the SQLJ
Connection Declaration page, provide the information
for the connection declaration clause, and then click Next.
- On the Review SQLJ Clause page, click Finish.
The SQLJ connection declaration clause is
added to the code at
the insertion point.