You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Drasko Kokic <dr...@yahoo.com> on 2001/04/20 16:30:14 UTC

[C1.8.x] Stored Procedures support in ESQL logicsheet

Hi there,

is there any progress in integrating the stored
procedures support into the ESQL logicsheet?

I know that there is a separate logicsheet proposal
for the stored procedures functionality, but believe
that would be better to extend ESQL logicsheet.

Anybody on it already?

Drasko


--- Ulrich Mayring <ul...@denic.de> wrote:
> > Donald Ball wrote:
> > 
> > > can you give me a short code snippet
> illustrating their use?
> > >
> > > - donald
> 
> from the auth taglib:
> 
> Connection con =
>
DriverManager.getConnection(dburl,username,password);
> String dbsp = "SP_MY_PROC";
> CallableStatement stmt = con.prepareCall("{?=call "
> + dbsp + "(?,?)}");
> stmt.registerOutParameter(1,java.sql.Types.VARCHAR);
> stmt.setString(2,param1);
> stmt.setString(3,param2);
> try {
> 	ResultSet rs = stmt.executeQuery();
> 	result = rs.getString(1);
> 	}
> catch(Exception e) {
> 	result = stmt.getString(1);
> 	}
> 
> This code takes into account that some wacky JDBC
> drivers (like the
> Sybase one I use) can only read the stored
> procedure's result with a
> result set, so this is tried first. If the JDBC
> driver is sane and
> throws an exception, then we try with
> stmt.getString(1), which
> apparently is the "correct" way of retrieving
> results from a stored
> procedure.
> 
> Ulrich
> 
> -- 
> Ulrich Mayring
> DENIC eG, Systementwicklung
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: [C1.8.x] Stored Procedures support in ESQL logicsheet

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 20 Apr 2001, Drasko Kokic wrote:

> is there any progress in integrating the stored
> procedures support into the ESQL logicsheet?
>
> I know that there is a separate logicsheet proposal
> for the stored procedures functionality, but believe
> that would be better to extend ESQL logicsheet.
>
> Anybody on it already?

i'm anxiously awaiting user feedback from the patch that was submitted - i
have no database that supports stored procedures, so i can't do any
testing. have you had success with it?

- donald


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>