Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: JDBC problem with Oracle 8.1.7
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
![]() |
![]() |