29.01.2013 Views

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 6-24 The generated SQL statement<br />

14.Click Parse to make sure the statement is syntactically correct.<br />

Note: Testing the SQL: In our sample, we have not populated the database<br />

with data, but if you are using a database that contains data you could test<br />

your SQL statement by doing the following:<br />

1. Click Execute. A new panel will appear.<br />

2. Click Execute on this panel.<br />

3. A window will pop up asking for a value for the host variable; for<br />

example, our search would require the user to enter a description to<br />

search on. We would enter something like ‘%Fleetwood%’ (including<br />

the single quotes). The case of the argument must match the case<br />

found in the database. The % signs allow you to search for any<br />

character String containing Fleetwood. The long description for each<br />

item would be searched for that character String and the results<br />

returned.<br />

In “Update the search argument” on page 193, we will show you how to<br />

modify the code generated by the wizard so that the user does not have to<br />

enter the % marks or be concerned about case to get a match.<br />

4. Click Next. On the Runtime connection page we determine the type of<br />

database connection code to generate. We have two choices. Using a data<br />

184 <strong>IBM</strong> <strong>WebSphere</strong> <strong>Application</strong> <strong>Server</strong> - Express V5.0.2 Developer Handbook

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!