wood burning stoves 2.0
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Calling stored procedures from JSP" Watch "Calling stored procedures from JSP" New topic

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.

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);
rs = (ResultSet)cs.getObject(1);
while ( rs.next() )
hope u can figure it out
if not ...just ask i'll be hapy to clarify
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
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.

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

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
It's not a secret anymore!