Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't set a Return Type for Data Function
Message
 
 
To
19/08/2010 12:46:06
General information
Forum:
ASP.NET
Category:
LINQ
Miscellaneous
Thread ID:
01477341
Message ID:
01477354
Views:
37
May be you can post both SPs?

I suspect that one of the returns a select result and another may be just
return @SomeIntValue -- as SP can only return an integer

>Hi,
>I have a view and Stored procedure
>From server explorer I drop the view to the Linq, and dtop stored procedure.
>I select a stored procedure in properties window and there Return Type is ReadOnly,
>I check a designer code and there is written
>
>
>	<FunctionAttribute(Name:="dbo.sp_search_int_stamm_access")>  _
>	Public Function sp_search_int_stamm_access(<Parameter(DbType:="NVarChar(100)")> ByVal tcAccess As String) As Integer
>		Dim result As IExecuteResult = Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod,MethodInfo), tcAccess)
>		Return CType(result.ReturnValue,Integer)
>	End Function
>
>
>When I check my another Linq objects with stored procedures - I have another code
>
>
>	<FunctionAttribute(Name:="dbo.sp_bestbuysearch_inmanufacturergroup")>  _
>	Public Function sp_bestbuysearch_inmanufacturergroup(<Parameter(DbType:="Int")> ByVal tnmanufacturerid As System.Nullable(Of Integer), <Parameter(DbType:="Char(100)")> ByVal tcsearchstring As String) As ISingleResult(Of view_vbestbuysearch1)
>		Dim result As IExecuteResult = Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod,MethodInfo), tnmanufacturerid, tcsearchstring)
>		Return CType(result.ReturnValue,ISingleResult(Of view_vbestbuysearch1))
>	End Function
>
>
>
>In second case its Return CType(result.ReturnValue,ISingleResult(Of view_vbestbuysearch1))
>In first - Integer.
>
>I compare stored procedures and found no diffrence. Why in one case designer file generates an INTEGER return value and in another case ISingleResult ?
>
>Thanks
>Denis
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform