Hello,
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
AS
SET @rs_cursor = CURSOR FOR select id, data, lastupdate, description
from tTest
OPEN @rs_cursor
GO
Following mapping has been done using the modeler:
<procedure name="spTestGet2" schema="dbo" catalog="spp"
returningValue="true">
<procedure-parameter name="@RETURN_VALUE" type="INTEGER"
length="4"/>
<procedure-parameter name="@rs_cursor" type="INTEGER"
length="4" direction="in_out"/>
</procedure>
By the way, for the "@return_value", I've the following warning: missing
direction.
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.
Regards,
Marc
-----Original Message-----
From: Andrus Adamchik [mailto:[EMAIL PROTECTED]
Sent: Monday, May 14, 2007 4:04 PM
To: [email protected]
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?
Andrus
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.