Sun-microsystems eWay JDBC/ODBC Adapter Manuel d'utilisateur Page 84

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 133
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 83
Chapter 6 Section 6.5
Implementing the JDBC/ODBC eWay Sample Projects Building and Deploying the prjJDBC_JCD Sample Project
JDBC/ODBC eWay Adapter User’s Guide 84 Sun Microsystems, Inc.
Figure 33 jcdPsSelect Business Rules
Sample code from the jcdPsSelect Includes:
package prjJDBC_JCDjcdALL;
public class jcdPsSelect
{
public com.stc.codegen.logger.Logger logger;
public com.stc.codegen.alerter.Alerter alerter;
public com.stc.codegen.util.CollaborationContext collabContext;
public com.stc.codegen.util.TypeConverter typeConverter;
public void receive( com.stc.connector.appconn.file.FileTextMessage
input, otdJDBC.OtdJDBCOTD otdJDBC_1,
dtd.otdOutputDTD882991309.DBemployee otdOutputDTD_DBemployee_1,
com.stc.connector.appconn.file.FileApplication FileClient_1 )
throws Throwable
{
\\ Writes out a message stating records are being selected.
FileClient_1.setText( "Selecting record(s) from db_employee
table via Prepared Statement select .." );
\\ Copies the database resultset into the otdInputDTD_DBEmployee OTD
and selects all available records from the database. The
executeQuery() method executes the prepared statement query, while
the resultsAvailable() method ensures all rows are retrieved in the
while loop.
FileClient_1.write();
otdJDBC_1.getSelect_ps().setEmp_no( Short.parseShort( "0" ) );
otdJDBC_1.getSelect_ps().executeQuery();
if (otdJDBC_1.getSelect_ps().resultsAvailable()) {
while
(otdJDBC_1.getSelect_ps().get$Select_psResults().next()) {
Vue de la page 83
1 2 ... 79 80 81 82 83 84 85 86 87 88 89 ... 132 133

Commentaires sur ces manuels

Pas de commentaire