• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

CallableStatement Error

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic