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

Applying XSQL Query Attributes


The <xsql:query> tag provides XSQL attributes to modify the data retrieved with the XSQL query and to modify the XML document produced with the XSQL query. The different XSQL attributes and their applications were discussed in the second table in this chapter. Some of the xsql-query attributes, such as page-params, are only available in the XSQL page.

To demonstrate XSQL query attributes, delete queryDB.xsql and create an XSQL page similar to the previous section, except when an XSQL Query is added from Component Palette, specify query attributes, and click on Next.

Select a database connection and click on Next. In the Query window, specify an SQL statement and click on Finish. Specify parameter markers in the SQL statement as we will be using bind parameters.

The queryDB.xsql page is listed below:

<?xml version = '1.0' encoding = 'windows-1252'?><page xmlns:xsql="urn:oracle-xsql" connection="jdbc/xsqlConnectionDS">
XSQLXSQL query attributes...