Progress
SQL-92
Guide and Reference


Using the Progress SQL-92 Java Classes

This section describes how you use the Progress SQL-92 Java classes to issue and process SQL statements in Java stored procedures.

To process SQL statements in a stored procedure, you must know whether the SQL statement generates output (in other words, if the statement is a query) or not. SELECT statements, for example, generate results: they retrieve data from one or more database tables and return the results as rows in a table.

Whether a statement generates such an SQL result set determines which Progress SQL-92 Java classes you should use to issue it:

In either case, if you want to return a result set to the application, use the DhSQLResultSet class to store rows of data in a procedure result set. You must use DhSQLResultSet methods to transfer data from an SQL result set to the procedure result set for the calling application to process it. You can also use DhSQLResultSet methods to store rows of data generated
internally by the procedure.

In addition, Progress SQL-92 provides the DhSQLException class so procedures can process and generate Java exceptions through the try, catch, and throw constructs.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095