If you have a method that does this:
// execute query
rs = (ResultSet) cstmt.getObject(1);
Would it be ok to use Types.Other? Why the need to use an oracle Cursor?
Also, what's the difference in " rs = (ResultSet) cstmt.getObject(1);
" and " rs = cstmt.getResultSet(1);"
Actually I had seen that page, and it poses the same question I am. the author uses an example of making a call and getting a resultset back, but he uses java.sql.Types and the last guy who is asking a question uses what I've typically seen, which is OracleTypes. My question is, why use OracleTypes, wouldn't using sql.Types.CURSOR work?
I know time has passed, but just to let you know, i've ended asking myself the same question. The answer as far as i know is: no you cannot use java.sql.Types.OTHER (java.sql.Types.CURSOR does not exist) instead of OracleTypes.CURSOR.
You HAVE to use OracleTypes.CURSOR in order for it to work. I believe this is because Oracle wants you to link to their classes and tie you up forever. I cannot see any reason why Types.OTHER wouldn't work exactly as using OracleTypes.CURSOR with an additional runtime checking of the return type.
Yes Mr.Eugenio said Oracle internal libraries didn't obey
java.sql interface specs. similar case for CLOB also.