Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

callable statement example

383782Feb 8 2004 — edited Feb 10 2004
Can someone please give me an example of a calling a pl/sql procedure from a struts action that includes out parameters. Sandra gave me the following code to create in my ViewRowImpl class
public void callMyProcedure()
throws Exception
{
Bc4jDBTransaction dbTransaction = (Bc4jDBTransaction)(get[Entity]().getDBTransaction());
String statement =
"begin my_procedure([arguments]); end;";
CallableStatement cs = dbTransaction.createCallableStatement(statement,0);
cs.execute();
cs.close();
}
but I need to use out parameters and the documentation on Callable Statement doesnt have any examples ? I see I have to regsiter the out params first ?? Help ?? Also to call from my struts action - I define an interface that is implemented by my ViewRowImpl class (correct ?) but then how do I call this from my struts action ?

ViewRowInterface proc = proc.callMyProcedure(arg1,arg2) ??

Thanks,
Brent
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 9 2004
Added on Feb 8 2004
3 comments
1,232 views