aspose file tools*
The moose likes JDBC and the fly likes how to call stored procedure and also get parameters from the web page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how to call stored procedure and also get parameters from the web page" Watch "how to call stored procedure and also get parameters from the web page" New topic
Author

how to call stored procedure and also get parameters from the web page

Bhasker Reddy
Ranch Hand

Joined: Jun 13, 2000
Posts: 176
I am working on a web site, where i am listing a set of stored
procedures on a page. user can click any of them, then it prompts another page where it asks for parameters for the stored
procedure. After entering the parameters for the Stored Procedure
user can submit the form on that page, it should call another
servlet.
where i need to execute stored procedure in a httpServlet. The parameters for the Stored PRocedure will come from the previous
servlet along with the Stored Procedure name. Different stored
procedures have different parameters, user can click
Spexecute?procedure_name=SP_EXPORT_PGE&Invoice_number=ewrew&+user_id=wrw
MY QUESTION IS HOW DO I COLLECT THESE VALUES(sometimes it can have three or four or five parameters)
and then call Stored PRocedure in the database, i know how to
connect to the database, but don't know how to call stored procedure.
does anyone has any code that solved similar problem,
sorry i think i am not very clear, ask me if this doesn't make sense

Bhasker Reddy
Roopa Bagur
Ranch Hand

Joined: Nov 03, 2000
Posts: 267
I think when using JDBC you will have to use callable statements to call storedprocedures..
Originally posted by Bhasker Reddy:
I am working on a web site, where i am listing a set of stored
procedures on a page. user can click any of them, then it prompts another page where it asks for parameters for the stored
procedure. After entering the parameters for the Stored Procedure
user can submit the form on that page, it should call another
servlet.
where i need to execute stored procedure in a httpServlet. The parameters for the Stored PRocedure will come from the previous
servlet along with the Stored Procedure name. Different stored
procedures have different parameters, user can click
Spexecute?procedure_name=SP_EXPORT_PGE&Invoice_number=ewrew&+user_id=wrw
MY QUESTION IS HOW DO I COLLECT THESE VALUES(sometimes it can have three or four or five parameters)
and then call Stored PRocedure in the database, i know how to
connect to the database, but don't know how to call stored procedure.
does anyone has any code that solved similar problem,
sorry i think i am not very clear, ask me if this doesn't make sense

Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9047
    
  10
I think this has nothing to do with Programmers Cert. I'm moving it to JDBC.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to call stored procedure and also get parameters from the web page