Execute SQL with Parameter

Executes a static SQL query by specifying its syntax and parameters.

Inputs

Database connection
A CwDBConnection object that represents the database connection.

Query
A String that represents the SQL query to execute in the database.

Parameters
A Vector object of arguments to pass to parameters in the SQL query.

Exceptions

The Execute SQL with Parameter function block can throw the CwDBSQLException exception if a database error occurs.

Notes

Refer to the Notes section for the Execute SQL function block in this chapter.

Related information

This function block is based on the CwDBConnection.executeSQL() method. For more information, see executeSQL().

Copyright IBM Corp. 1997, 2004