This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CallableStatement Error

 
Ramesh KP
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic