Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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 ]
 
Won't you please? Please won't you be my neighbor? - Fred Rogers. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic