Dear all,

 

I've a question regarding stored procedure in MS SqlServer 2005.

 

I would like to understand why I have to specify the following cayenne
mapping in order to be able to use my procedure properly.

This is my stored procedure:

 

CREATE PROCEDURE dbo.spViewCustomer @ID as int, @User as varchar(25) 

WITH EXECUTE AS SELF

AS

SELECT type_id, status FROM tCustomer (nolock) WHERE [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>  

GO

 

In order to be able to retrieve the result of the select statement, I've
implemented the mapping like this:

 

...

<procedure name="spViewCustomer" schema="dbo" returningValue="true">
  <procedure-parameter name="returnValue" type="INTEGER"
direction="in"/>
  <procedure-parameter name="id" type="INTEGER" direction="in"/>
  <procedure-parameter name="user" type="VARCHAR" length="25"
direction="in"/>
</procedure>

...

 

I've no problem with the "id" and "user" parameters. But I really do not
understand why I have to set my "returnValue" as INTEGER with the
direction "IN"... I tried with other options but without any success. 

 

Could you explain me why I have to do this in that way?

 

Thank you very much for your help.

 

Marc Gabriel

 

 

 

Reply via email to