File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes TYPE DEFAULT ' '   help! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "TYPE DEFAULT Watch "TYPE DEFAULT New topic

TYPE DEFAULT ' ' help!

bo shen

Joined: Jul 17, 2002
Posts: 4
Hello, I am trying to call a stored procedure in oracle database via EJB.
There is one IN paramater in the procedure(i dont remmeber the exact syntex but similiar to this):
somename IN table.field%TYPE DEFAULT ' '
table.field has a CHAR or VARCHAR datatype.
My question is what exactly does TYPE DEFAULT ' ' mean??

When i call the procedure via sql query:
{call HELP_ME(' ')}, it returns all the nice results and works perfectly.
But when I try to call it via EJB ( all my ejb codes are correct, they worked for all other procedures just fine):
CallableStatement cs = con.prepareCall("{call HELP_ME(?,?)}");
cs.setString(1,""); also tried cs.setString(1," ");

It returns back 0 results, no errors just no records found. But if i do {call HELP_ME(' ')} from sqlquery it returns back lots records. Why is this happening? i just cannot figure out, please help! Thank you.
I agree. Here's the link:
subject: TYPE DEFAULT ' ' help!
It's not a secret anymore!