You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tim Bachta <tb...@kopent.com> on 2003/06/05 21:24:49 UTC

MS SQL Stored Procedure Help

I am trying to call this procedure using cocoon.  getLoginResult.  This
stored procedure takes 2 strings and returns an int.  My code is below
but I am getting an error of incorrect syntax near {.  I have tried
literally hundreds of different combinations with nothing working can
someone please show me the light?

<esql:connection>

<esql:pool>vyzo</esql:pool>

<esql:execute-query>

<esql:call>

{ getLoginResult (<esql:parameter direction="in"
type="String"><xsp:expr>user</xsp:expr></esql:parameter>,<esql:parameter
direction="in"
type="String"><xsp:expr>password</xsp:expr></esql:parameter>)}

</esql:call>

<esql:results>

<esql:row-results>

<data>

<xsp:logic>

 login = <esql:get-int column="1"/>;

</xsp:logic>

</data>

</esql:row-results>

</esql:results>

</esql:execute-query>

</esql:connection>

 

 

Thank you

 

Tim

 


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


Re: MS SQL Stored Procedure Help

Posted by Frank Taffelt <fr...@interface-business.de>.
this is a snippet which works for me under mssql (jtds driver):

<esql:call>
{call proc_info(
 <esql:parameter
type="Int"><xsp:expr>Integer.parseInt(id)</xsp:expr></esql:parameter>
 )}
 </esql:call>
 <esql:results>
    <esql:row-results>
       ...
    </esql:row-results>
 </esql:results>

i'm remembering problems with the positioning of "{" and the following
"call" keyword. You have to make sure that there is no space between them.
I'm not sure if this a jdbc driver issue or strictly enforced by jdbc, but
this drived my crazzy.

hth,
Frank


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