6 add prepared statement, Add prepared statement – Sun Microsystems eWay JDBC/ODBC Adapter User Manual
Page 52
 
Chapter 4
Section 4.2
Using the JDBC/ODBC eWay Database Wizard
Creating a New JDBC OTD
JDBC/ODBC eWay Adapter User’s Guide
52
Sun Microsystems, Inc.
8
On the Select Procedures and specify Resultset and Parameter Information 
window click Next to continue.
Note:
Not all drivers and databases support stored procedures or stored procedures with 
ResultSets. You may contact the driver’s vendor for more information.
4.2.6
Add Prepared Statement
Add a Prepared Statement object to your OTD.
Steps Required to Add Prepared Statements Include:
Note:
When using a Prepared Statement, the ‘ResultsAvailable()’ method will always 
return true. Although this method is available, you should not use it with a ‘while’ 
loop. Doing so would result in an infinite loop at runtime and will stop all of the 
system’s CPU. If it is used, it should only be used with the ‘if’ statement.
1
On the Add Prepared Statements window, click Add.
Manually Mode
"Manually" mode is the most flexible way to generate 
the result set nodes. It allows users to specify the node 
name, original column name and data type manually. 
One drawback of this method is that users need to 
know the original column names and data types. This is 
not always possible. For example, the column name of 
3*C in this query.
SELECT A, B, 3*C FROM table T
is generated by the database. In this case, "With 
Assistance" mode is a better choice.
If you modify the ResultSet generated by the “Execute” 
mode of the Database Wizard you need to make sure 
the indexes match the Stored Procedure. This assures 
your ResultSet indexes are preserved.