problem with a sequence visibility... [message #116221] |
Mon, 18 April 2005 11:14 |
fejones
Messages: 1 Registered: April 2005
|
Junior Member |
|
|
Greetings, everybody
I have a problem:
In a Java application, there's a line that try to get a sequence value, as follows:
...
PreparedStatement stmt = conn.prepareStatement("select any_schema.SQ_WHATEVER.nextval as NEXTVAL from dual"); //where conn is a java.sql.Connection instance
rs = stmt.executeQuery(); //rs is a java.sql.ResultSet
...
When it runs, it raises the exception:
java.sql.SQLException: ORA-00942: table or view does not exist
...but the sequence EXISTS!!!
I've checked the return in SQL Plus, I've checked the permissions to access the sequence...
...and I couldn't find the root of this problem!
Could somebody help me???
Since now, I thank you!
|
|
|