File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Calling stored procedures from JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Calling stored procedures from JSP" Watch "Calling stored procedures from JSP" New topic
Author

Calling stored procedures from JSP

sunil kumre
Ranch Hand

Joined: Dec 23, 2000
Posts: 64
Is it possible to call stored procedures from a Jsp file?How?
thanks in advance.
sunil
prabhatis
Greenhorn

Joined: Apr 07, 2001
Posts: 18
try this ..
Connection con = getConnection();
CallableStatement cs = con.prepareCall("{? = call X2K.pkgQuotes.CHECKEXPIRATION(?, ?, ?)}");
cs.registerOutParameter(1, java.sql.Types.OTHER);
cs.setString(2, rootSymbol );
cs.setString(3, futureOption);
cs.setString(4, exchangeCode);
cs.execute();
rs = (ResultSet)cs.getObject(1);
while ( rs.next() )
{}
hope u can figure it out
if not ...just ask i'll be hapy to clarify
Prabhat
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
"prabhatis",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.

Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
prabhatis
Greenhorn

Joined: Apr 07, 2001
Posts: 18
thanx for reminding..
i am going to reregister my serf as prabhat kumar will this do ??
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling stored procedures from JSP