Forums Register Login

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

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
Should this



be


+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
Your PL/SQL function returns a number, not a ResultSet.
+Pie Number of slices to send: Send
He's my best friend. Not yours. Mine. You can have this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 513 times.
Similar Threads
Calling a DB2 UDF within Java
About ResultSet problem!
looking for help with datatype match
looking for help with datatype match
Connection refused, i can't log in to my SQL-Server
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:54:16.