On Fri, Jan 10, 2003 at 07:52:33PM +0000, Brian Campbell wrote:
> Hope this is the appropriate list for this question.
>
> I have a simple XSP page. I want to use ESQL to call stored procedures in
> a Microsoft SQL Server database. I've got my connection pool set up
> correctly. I'm able to execute simple select statements and I'm able to
> execute a stored procedure that doesn't take any parameters. But most of
> my stored prcedures take parameters. Can't seem to find any good examples
> anywhere. My code is below. Anyone able to tell me what I'm doing wrong?
> Thanks.
>
>
>
> <xsp:page language="java"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:xsp-request="http://apache.org/xsp/request/2.0"
> xmlns:esql="http://apache.org/cocoon/SQL/v2"
> xmlns:log="http://apache.org/xsp/log/2.0">
> <root>
> <esql:connection>
> <esql:pool>mpts-pool</esql:pool>
>
> <esql:execute-query>
> <esql:call>
> { call sp_DayShift_Report_ListByName
> ((<esql:parameter direction="in"
>
>type="String"><xsp-request:get-parameter name="sQuerry"/></esql:parameter>)
> }
> </esql:call>
>
> <esql:results>
> <esql:row-results>
> <data>
> <esql:get-columns/>
> </data>
> </esql:row-results>
> </esql:results>
> </esql:execute-query>
> </esql:connection>
> </root>
> </xsp:page>
I remember I had two problems with stored procedures in MS SQL:
1. if you use for example integer parameters you have to have an separated int variable
declared for parameter use
2. my stored procedure did not work without allow-multiple-results clause set
to yes - for example errors were not reported
ouzo
--
__
| / \ | Leszek Gawron // \\
\_\\ //_/ [EMAIL PROTECTED] _\\()//_
.'/()\'. Phone: +48(600)341118 / // \\ \
\\ // recursive: adj; see recursive | \__/ |
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>