cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Sexton <jsex...@odshp.com>
Subject Re: esql stored procedure problem
Date Fri, 02 May 2003 17:05:10 GMT

On Fri, 2 May 2003, Geoff Howard wrote:
> Wouldn't you drop "exec"? and just use proc_name in esql:call?

That gives "syntax error near provDetail"

The example on the apache site does not include "exec".  I added it just
as a guess.

> >What database are you using?  Are you sure "exec proc_name(...)" works
> >generally?  E.g., that works in SQL*Plus for Oracle, but not in other query
> >tools.

I'm using Sybase ASE and jConnect.  I have production servlets using
various types of calls, and cocoon database apps using straight queries,
all working.  I'd like to figure out how to call a stored procedure from
xsp rather than writing a little servlet that returns XML as I have been
doing so far.

I'll keep trying other combinations.


> >So you might try something like:
> ><esql:call>
> >       begin
> >             provDetail(
> >                   <esql:parameter direction="in" type
> >="Int"><xsp:expr>pkInt</xsp:expr></esql:parameter>,
> >                   <esql:parameter direction="in" type
> >="String"><xsp:expr>ciString</xsp:expr></esql:parameter>,
> >                   <esql:parameter direction="in" type
> >="String"><xsp:expr>prString</xsp:expr></esql:parameter>
> >             );
> >       end;
> ></esql:call>
> >
> >I haven't really tested any of this, so YMMV.
> >
> >-Christopher
> >
> >
> >
> >
> >
> >                       Jeff
> > Sexton
> >
> >                       <jsexton@odshp.co        To:
> > cocoon-users@xml.apache.org
> >                       m>                       cc:
> >
> >                                                Subject:  esql stored
> > procedure problem
> >                       05/02/2003
> > 11:36
> >
> >                       AM
> >
> >                       Please respond
> > to
> >
> >                       cocoon-users
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >I've put the following in an xsp.  The pool works for SQL, but this is my
> >first try at calling a stored procedure.  I couldn't find an example of
> >using multiple parameters so maybe I'm doing this wrong?  I get an
> >SQL error.
> >
> >Incorrect syntax near '@p0'
> >
> >I'm using Sybase's jConnect.  Here's the code, any ideas?  Does this even
> >look right?  I have several guesses here
> >
> >     <esql:connection>
> >       <esql:pool>odsdb02_pool</esql:pool>
> >       <transactions>
> >         <esql:execute-query>
> >           <esql:call>
> >             (exec provDetail(
> >               <esql:parameter direction="in" type
> >="Int"><xsp:expr>pkInt</xsp:expr></esql:parameter>
> >               <esql:parameter direction="in" type
> >="String"><xsp:expr>ciString</xsp:expr></esql:parameter>
> >               <esql:parameter direction="in" type
> >="String"><xsp:expr>prString</xsp:expr></esql:parameter>
> >             )}
> >           </esql:call>
> >           <esql:call-results>
> >             <esql:use-results>
> >             <esql:result><xsp:expr>(ResultSet)<esql:get-object column="1"
> >from-call="true"/></xsp:expr></esql:result>
> >                   <TITLE><esql:get-string column="1"/></TITLE>
> >             </esql:use-results>
> >           </esql:call-results>
> >           <esql:error-results>
> >             <EXCEPTION>
> >               SQL Exception: <esql:get-message/>
> >             </EXCEPTION>
> >           </esql:error-results>
> >         </esql:execute-query>
> >
> >       </transactions>
> >     </esql:connection>
> >
> >Jeff Sexton
> >ODS Health Plans
> >jsexton@odshp.com
> >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> >For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message