Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: JDBC problem with Oracle 8.1.7

Re: JDBC problem with Oracle 8.1.7

From: Harald Maier <maierh_at_myself.com>
Date: Mon, 18 Aug 2003 14:02:22 +0200
Message-ID: <m3fzjz2my9.fsf@ate.maierh>


Michal Rutkowski <mr189200_at_zodiac.mimuw.eduXXX.pl> writes:

> The whole thing is running on JBOSS 2.4.10 (Linux machine) , i'm conected to
> a Oracle 8.1.7 Server on a Windows Server.
>
> The connection is ok. Other queries and stuff work ok.
>
> the code looks like this :
>
> String query = "SELECT smthing FROM some_table WHERE id = ?";
> PreparedStatement ps = conn.PrepareStatement(query);
> ps.setString(1, id.toString());
> ps.executeQuery();

Maybe the bind variable has the wrong datatype. So opening the cursor fails. What tells you the exception?.

Harald

>
> the last line throws the folowing exception :
>
> java.sql.SQLException: Closed statement
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211)
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:274)
> at oracle.jdbc.driver.OracleStatement.ensureOpen(OracleStatement.java:49
Received on Mon Aug 18 2003 - 07:02:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US