Hi Naomi,
I found the answer,
Its well known case when SQL Query has a JOINS inside, then the metadata is not generated and then the data function returns Integer.
I wrote new function with another name in Linq partial class which returns me correct type.
Hope it will work.. now working on it :)
Thanks
Denis
>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