A
Alex. O. Koranteng
I am using a stored procedure to bind to a LINQDatasource to populate gridview.
I am getting the error shown below when the stored procedure is executed. I
do not see where the method GetProductsResult is coming from. I have provided
the synatx for the SPROC. dbo.Get Products as follows:
USE [AdventureWorks]
GO
/****** Object: StoredProcedure [dbo].[GetProducts] Script Date:
06/07/2009 16:14:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/* Gets the customer information */
ALTER PROCEDURE [dbo].[GetProducts]
AS
SET NOCOUNT ON;
SELECT
ProductID, Name, rowguid, ModifiedDate
FROM
Production.Product
[Function(Name="dbo.GetProducts")]
public ISingleResult<GetProductsResult> GetProducts()
{
IExecuteResult result = this.ExecuteMethodCall(this,
((MethodInfo)(MethodInfo.GetCurrentMethod())));
return ((ISingleResult<GetProductsResult>)(result.ReturnValue));
}
Error Message
Server Error in '/LinqDataSourceExampleCode1' Application.
--------------------------------------------------------------------------------
No property or field 'rowguid' exists in type 'GetProductsResult'
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.Web.Query.Dynamic.ParseException: No property or
field 'rowguid' exists in type 'GetProductsResult'
Source Error:
I am getting the error shown below when the stored procedure is executed. I
do not see where the method GetProductsResult is coming from. I have provided
the synatx for the SPROC. dbo.Get Products as follows:
USE [AdventureWorks]
GO
/****** Object: StoredProcedure [dbo].[GetProducts] Script Date:
06/07/2009 16:14:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/* Gets the customer information */
ALTER PROCEDURE [dbo].[GetProducts]
AS
SET NOCOUNT ON;
SELECT
ProductID, Name, rowguid, ModifiedDate
FROM
Production.Product
[Function(Name="dbo.GetProducts")]
public ISingleResult<GetProductsResult> GetProducts()
{
IExecuteResult result = this.ExecuteMethodCall(this,
((MethodInfo)(MethodInfo.GetCurrentMethod())));
return ((ISingleResult<GetProductsResult>)(result.ReturnValue));
}
Error Message
Server Error in '/LinqDataSourceExampleCode1' Application.
--------------------------------------------------------------------------------
No property or field 'rowguid' exists in type 'GetProductsResult'
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.Web.Query.Dynamic.ParseException: No property or
field 'rowguid' exists in type 'GetProductsResult'
Source Error: