Hi all
I get this Error when i try to run stored procedure from NHibernate :
could not execute query
>
> [ //code name of your SP
>
>
>
> //all the return parameters
>
and this is the Inner Exception :
Incorrect syntax near '/'.
>
> A RETURN statement with a return value cannot be used in this context.
>
>
>
Stored Proocedure Mapping:
<sql-query name="GetVehicleRoads" callable="true">
>
> //code name of your SP
>
> <return-scalar column="Vehicle_Board" type="String" /> //all the
> return parameters
>
> <return-scalar column="Ar_Str" type="String" />
>
> <return-scalar column="En_Str" type="String" />
>
> <return-scalar column="Enter_Time" type="DateTime" />
>
> <return-scalar column="Exit_Time" type="DateTime" />
>
> <return-scalar column="AVG_Speed" type="Double" />
>
> <return-scalar column="Max_Speed" type="Double" />
>
> <return-scalar column="Min_Speed" type="Double" />
>
> exec [GetVehicleRoads] ?,?,?
> </sql-query>
Calling The procedure :
> IQuery query = Session.GetNamedQuery("GetVehicleRoads");
>
> query.SetInt32(0, vehicleId);
>
> query.SetDateTime(1,formDate);
>
> query.SetDateTime(2,toDate);
> IList<RoadsOfVehicle> list = query.List<RoadsOfVehicle>();
>
>
>
> return list;
>
>
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.