Adding an SQLJ connection declaration clause to an SQLJ file

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:

  1. In the open SQLJ file, place the cursor at the location in the code where you want to add the SQLJ connection declaration clause.
  2. Right-click at the insertion point, and then click SQLJ Assist > Insert Connection Declaration on the pop-up menu.
  3. On the SQLJ Connection Declaration page, provide the information for the connection declaration clause, and then click Next.
  4. On the Review SQLJ Clause page, click Finish.

The SQLJ connection declaration clause is added to the code at the insertion point.

Related tasks
Adding an SQLJ iterator declaration clause to an SQLJ file
Adding an SQLJ assignment clause to an SQLJ file
Editing SQLJ files
Related reference
Insert SQL Connection Declaration wizard - SQLJ Connection Declaration page
SQLJ connection-declaration-clause

Comentarios