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