cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Gabriel-Willem" <>
Subject RE: Stored procedure question ?
Date Tue, 15 May 2007 07:53:15 GMT

I removed the first parameter and the "returningValue" flag ... and
indeed it is working properly. I'm really surprised because I used the
"reengineer database schema" function to create the mapping file. 

Is it a problem from the modeler? 

I've another question for you.

In MS sqlserver, we have the following stored procedure:

CREATE procedure [dbo].[spTestGet2] @rs_cursor CURSOR VARYING OUTPUT
SET  @rs_cursor = CURSOR FOR select id, data, lastupdate, description
from tTest
OPEN @rs_cursor

Following mapping has been done using the modeler:
<procedure name="spTestGet2" schema="dbo" catalog="spp"
		<procedure-parameter name="@RETURN_VALUE" type="INTEGER"
		<procedure-parameter name="@rs_cursor" type="INTEGER"
length="4" direction="in_out"/>

By the way, for the "@return_value", I've the following warning: missing

I removed the first parameter in order to fix that warning.
Nevertheless, the performGenericQuery function throws an exception:
ProcedureQuery query = new ProcedureQuery("spTestGet2");
QueryResponse result = context.performGenericQuery(query);

The exception:
Caused by: java.sql.SQLException: Operand type clash: int is
incompatible with cursor

For information, I'm using the "JTDS 1.2" driver.

Thank you for your help.


-----Original Message-----
From: Andrus Adamchik [] 
Sent: Monday, May 14, 2007 4:04 PM
Subject: Re: Stored procedure question ?

This doesn't make sense to me either. So what happens of you remove  
the first parameter and set "returningValue" to false?


On May 14, 2007, at 4:58 PM, Marc Gabriel-Willem wrote:

> <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.

View raw message