Home » Developer & Programmer » JDeveloper, Java & XML » Error OracleResultSet getString + constraint expression
Error OracleResultSet getString + constraint expression [message #215970] Wed, 24 January 2007 08:37 Go to next message
hypersound
Messages: 2
Registered: January 2007
Junior Member
Hello, maybe someone can help me.

I want to read the expression of a check constraint with JDBC.
I do that like this:
String tableName="TABLE1";

OracleResultSet checkCons_rs=null;

Here the SQL Query Query:
checkCons_rs=executeSQLQuery("SELECT TABLE_NAME,CONSTRAINT_NAME,CONSTRAINT_TYPE,SEARCH_ CONDITION,GENERATED
FROM USER_CONSTRAINTS WHERE TABLE_NAME='" + tableName + "' and CONSTRAINT_TYPE='C'");

If I now want to read the expression
String constraintExpr=checkCons_rs.getString("SEARCH_COND ITION");

I get the following error (I translated the error message from German to English):
java.SQLException.SQLException: Stream is already closed

I only get the error by reading SEARCH_CONDITION SEARCH_CONDITION!!!
Reading for example the constraint name works fine:
constraintName=checkCons_rs.getString("CONSTRAINT_ NAME");

No error

Additional:
I am using Oracle 10g Xe JRE JRE 1.4

Thanks for your help
Re: Error OracleResultSet getString + constraint expression [message #216005 is a reply to message #215970] Wed, 24 January 2007 10:33 Go to previous message
hypersound
Messages: 2
Registered: January 2007
Junior Member
I found a solution for that problem.
It seems to be a mistake of Oracle.

If you want to read out the SEARCH_CONDITION you have to do that, before you get any other column like COLUMN_NAME or something else.

Regards
Florian
Previous Topic: jsp page give this error Database Log In Failed
Next Topic: see my jsp error dscon$jsp.java [67:1] cannot resolve symbol (not configer tomcate datasource)
Goto Forum:
  


Current Time: Fri Dec 09 17:25:59 CST 2016

Total time taken to generate the page: 0.27238 seconds