Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Overview of this book

Table of Contents (20 chapters)
JDBC 4.0 and Oracle JDeveloper for J2EE Development
Credits
About the Author
About the Reviewer
Preface

Creating XSQL Queries


In this section, we will create an XSQL page (queryDb.xsql) in JDeveloper. To create an XSQL file, select the project node in the Applications Navigator frame and select File | New. In the New Gallery window, select General | XML in Categories. In Items, select the XSQL File and click on OK.

In the Create XSQL File frame, specify a File Name and click on OK. An XSQL page is added to the JDeveloper project including an XSQLConfig.xml configuration file.

The libraries required for an XSQL application are added to the project libraries.

We will construct an XSQL page to query the example database table Catalog and generate an XML document. The XSQL Component Palette provides different XSQL components that were discussed in the first table in this chapter. Next we'll add <xsql:query></xsql:query> tags to the XSQL page to process XSQL queries. The application of XSQL queries may require the use of bind variables, the variables in a SQL statement.

Bind variables...