Class com.ibm.db.SQLStatement
java.lang.Object
|
+----com.ibm.db.Statement
|
+----com.ibm.db.SQLStatement
- public class SQLStatement
- extends Statement
SQLStatement represents a SQL statement that doesn't return a result set.
- Version:
- 1.0 06/30/98
- See Also:
- Statement
Constructor Index
- SQLStatement()
- Construsts a new SQLStatement.
Method Index
- execute()
- Executes the SQL statement.
- getNumAffectedRows()
- Returns the number of rows that were affected by executing the SQL statement.
Constructors
SQLStatement
public SQLStatement()
- Construsts a new SQLStatement.
Methods
execute
public void execute() throws DataException
- Executes the SQL statement. If needed, a connection is made to the database prior
to executing the SQL statement, using the associated DatabaseConnection. The SQL
statement is obtained from the StatementMetaData associated with this SQLStatement.
The events aboutExecute
and executed
are
triggered by this method.
- Throws: DataException
- if no associated DatabaseConnection
- Throws: DataException
- if SQL statement is null
- Overrides:
- execute in class Statement
- See Also:
- DatabaseConnection, StatementMetaData
getNumAffectedRows
public int getNumAffectedRows()
- Returns the number of rows that were affected by executing the SQL statement.
- Returns:
- the number of affected rows
