iiitToolkit 1.0

de.iiit.jdbc
Class JdbcStatement

java.lang.Object
  |
  +--de.iiit.jdbc.JdbcStatement

public class JdbcStatement
extends Object

Encapsulates a java.sql.Statement

Version:
$Revision: 1.6 $ $Date: 2003/01/01 21:03:49 $

Constructor Summary
protected JdbcStatement(JdbcConnection connection, Statement statement)
          Creates a new instance of JdbcStatement
 
Method Summary
 void close()
          Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
 boolean execute(String sql)
          Executes the given SQL statement, which may return multiple results.
protected  void finalize()
          Release the JdbcConnection hold by this object explicitly.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcStatement

protected JdbcStatement(JdbcConnection connection,
                        Statement statement)
Creates a new instance of JdbcStatement

Parameters:
connection - the connection that was used to create the meta data object.
statement - the encapsulated java.sql.Statement
Method Detail

execute

public boolean execute(String sql)
                throws JdbcException
Executes the given SQL statement, which may return multiple results.

Parameters:
sql - any SQL statement
Returns:
true if the first result is a ResultSet object; false if it is an update count or there are no results
Throws:
JdbcException - if a database access error occurs

close

public void close()
           throws JdbcException
Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed. It is generally good practice to release resources as soon as you are finished with them to avoid tying up database resources.

Throws:
JdbcException - if a database access error occurs

finalize

protected void finalize()
                 throws Throwable
Release the JdbcConnection hold by this object explicitly.

Overrides:
finalize in class Object
Throws:
Throwable - Any throwable thrown during the excution.

iiitToolkit 1.0

Copyright © 2002, 2003 ingeneurbuero fuer innovative informationstechnik, Dipl.-Ing. Joerg Beckmann, Dortmund, Germany. All Rights Reserved.
See Copyright statement