This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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!