File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes CallableStatement Error  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "CallableStatement Error  " Watch "CallableStatement Error  " New topic
Author

CallableStatement Error

Ramesh KP
Greenhorn

Joined: Mar 03, 2004
Posts: 1
Hi Friends,
I am new to this JavaRanch, I am getting One problem using callableStatement.
My Procedure Is.
course_search_actions_pkg_mt.PROCEDURE GET_SUP_COURSES_BY_LOCAL
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
IN_PERS_ID VARCHAR2 IN
IN_CRSE_LOCAL_CD VARCHAR2 IN
IN_NUM_TO_RETRIEVE NUMBER(38) IN
COURSE_LIMIT NUMBER(38) IN
CRSECD TABLE OF VARCHAR2(10) OUT
CRSEREVCD TABLE OF VARCHAR2(10) OUT
CRSETTL TABLE OF VARCHAR2(82) OUT
AVGINCLASS TABLE OF NUMBER OUT
CRSESTATUS TABLE OF VARCHAR2(10) OUT
SITECD TABLE OF VARCHAR2(10) OUT
LOCALBROWSE TABLE OF VARCHAR2(10) OUT
RESPONSIBLEORG TABLE OF VARCHAR2(10) OUT
LOCALCRSECD TABLE OF VARCHAR2(10) OUT
LABIND TABLE OF VARCHAR2(10) OUT
ONLINEIND TABLE OF VARCHAR2(10) OUT
SELFSTUDYIND TABLE OF VARCHAR2(10) OUT
SESSREQIND TABLE OF VARCHAR2(1) OUT
SESSIONEXISTS TABLE OF NUMBER OUT
RECCOUNT NUMBER(38) OUT
DONEFLAG NUMBER(38) OUT
My Java Code Is
Connection con = null;
ResultSet rs = null;
CallableStatement cstmt=null;

con = getConnection ();
cstmt = con.prepareCall ("(begin ? := call course_search_actions_pkg_mt.GET_SUP_COURSES_BY_LOCAL (?,?,?,?); end ");
cstmt.registerOutParameter(1,oracle.jdbc.driver.OracleTypes.CURSOR);
cstmt.setString(2,strPersId);
cstmt.setString(3,strLocalCd);
cstmt.setInt(4, intnumToReturn);
cstmt.setInt(5, intcourseLimit);
cstmt.execute();
rs=(ResultSet)cstmt.getObject(1);
while(rs.next()){
//Do Some Thing
}
cstmt.close();
con.close();
Error is :
java.sql.SQLException: ORA-00928: missing SELECT keyword
My Question :
How i will use the above stored proc.
[ March 03, 2004: Message edited by: Ramesh KP ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CallableStatement Error