'System.Data.DataRowView' does not contain a prope
VS 2003, sql server
I get the following error:
DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with the name LastDate.
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.HttpException: DataBinder.Eval: 'System.Data.DataRowView'
does not contain a property with the name LastDate.
Source Error:
Line 73: <%# DataBinder.Eval(Container.DataItem,"LastDate","{0: MM/dd/yyyy}") %>
My view is as follows:
CREATE VIEW dbo.vFieldReport
AS
SELECT dbo.Borrower.BName, dbo.FieldReports.CIF, dbo.FieldReports.FRID, dbo.FieldReports.LastDate,
dbo.FieldReports.DueDate, dbo.FieldReports.Overide,
dbo.FieldReports.NewDueDate, dbo.FieldReports.Freq,
dbo.FieldReports.DepthLevel, dbo.FieldReports.OrderDate, dbo.FieldReports.comments,
dbo.FieldReports.RiskRating, dbo.FieldReports.UCSClass, dbo.Loans.LoanNo
FROM dbo.Borrower INNER JOIN
dbo.FieldReports ON dbo.Borrower.CIF = dbo.FieldReports.CIF CROSS JOIN
dbo.Loans
My FieldReports Table is as follows:
Column Name Data Type Length Allow Nulls
LastDate dateTime 8 Yes
Here is the whole error code:
Server Error in '/COMS' Application.
--------------------------------------------------------------------------------
DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with the name LastDate.
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.HttpException: DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with the name LastDate.
Source Error:
Line 71: <ItemStyle Wrap="False" HorizontalAlign="Center"></ItemStyle>
Line 72: <ItemTemplate>
Line 73: <%# DataBinder.Eval(Container.DataItem,"LastDate","{0: MM/dd/yyyy}") %>
Line 74: </ItemTemplate>
Line 75: <EditItemTemplate>
Source File: c:\inetpub\wwwroot\COMS\FieldReport.aspx Line: 73
Stack Trace:
[HttpException (0x80004005): DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with the name LastDate.]
System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName) +146
System.Web.UI.DataBinder.Eval(Object container, String[] expressionParts) +71
System.Web.UI.DataBinder.Eval(Object container, String expression) +82
System.Web.UI.DataBinder.Eval(Object container, String expression, String format) +12
ASP.FieldReport_aspx.__DataBind__control29(Object sender, EventArgs e) in c:\inetpub\wwwroot\COMS\FieldReport.aspx:73
System.Web.UI.Control.OnDataBinding(EventArgs e) +66
System.Web.UI.Control.DataBind() +26
System.Web.UI.Control.DataBind() +86
System.Web.UI.Control.DataBind() +86
System.Web.UI.WebControls.DataGrid.CreateItem(Int3 2 itemIndex, Int32 dataSourceIndex, ListItemType itemType, Boolean dataBind, Object dataItem, DataGridColumn[] columns, TableRowCollection rows, PagedDataSource pagedDataSource) +169
System.Web.UI.WebControls.DataGrid.CreateControlHi erarchy(Boolean useDataSource) +1408
System.Web.UI.WebControls.BaseDataList.OnDataBindi ng(EventArgs e) +49
System.Web.UI.WebControls.BaseDataList.DataBind() +23
COMS.FieldReports.BindData(Int32 intPageIndex, String strSortExp, String strSortOrder, String strBranch, String strBranchJ, String strBranch1, String strBranch9, String strType) +450
COMS.FieldReports.Page_Load(Object sender, EventArgs e) +185
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
|