cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Gabriel-Willem" <marc.gabriel-wil...@side-international.com>
Subject Stored procedure question ?
Date Mon, 14 May 2007 13:58:41 GMT
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 ID=@ID
<mailto:ID=@ID>  

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

 

 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message