• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how do i get one column result and pass one parm to prapareCall method.

 
rekha sen
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i wrote a function in oracle ,which return a number value by taking one parm value.

In Java I call that function as,



This is throwing an SQLException.

Error Message is like this:
ERROR: SQL Exception when executing F_CHK_PREVIOUSLOAD

ERROR MESSAGE IS: Missing IN or OUT parameter at index:: 2
SQLState: null

Please tell me where I went wrong. Thanks.
 
Swastik Dey
Rancher
Posts: 1637
6
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should this



be


 
rekha sen
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After making the necessary change of changing the input parm to 2, I get this error:

Exception in thread "main" java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.sql.ResultSet

The code used is :


Please help in solving the error message.
 
Dave Tolls
Ranch Hand
Posts: 2091
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your PL/SQL function returns a number, not a ResultSet.
 
Swastik Dey
Rancher
Posts: 1637
6
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic