Bug 53057 - Column 'D' does not belong to table DefaultView.
Summary: Column 'D' does not belong to table DefaultView.
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web (show other bugs)
Version: 4.8.0 (C9)
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2017-03-04 16:44 UTC by Fredy Quiroz
Modified: 2017-06-26 12:50 UTC (History)
2 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:

Example page that replicates the error (1.29 KB, application/xml)
2017-03-04 16:44 UTC, Fredy Quiroz

Description Fredy Quiroz 2017-03-04 16:44:29 UTC
Created attachment 20133 [details]
Example page that replicates the error

When in the ASP.NET page uses a GridView with DataKeyNames and the DataSource is a SqlDataSource with SelectParameters with a ControlParameter and the code side use a DataBind and all conditions are fulfilled. The page fails with Column 'x' does not belong to table DefaultView.

this error is only for mono version 4.8 the mono version 4.6 has not error.

Attach the sample page with error

The complete error is 

Column 'D' does not belong to table DefaultView.

Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.Data.
Exception stack trace:
  at System.Data.DataRow.CheckColumn (System.Data.DataColumn column) [0x00038] in <d78e23b9da1b47f3b6c71ea3a9196539>:0 
  at System.Data.DataRow.get_Item (System.Data.DataColumn column, System.Data.DataRowVersion version) [0x00000] in <d78e23b9da1b47f3b6c71ea3a9196539>:0 
  at System.Data.DataRowView.GetColumnValue (System.Data.DataColumn column) [0x0000d] in <d78e23b9da1b47f3b6c71ea3a9196539>:0 
  at System.Data.DataColumnPropertyDescriptor.GetValue (System.Object component) [0x00007] in <d78e23b9da1b47f3b6c71ea3a9196539>:0 
  at System.Web.UI.WebControls.GridView.CreateDictionaryFromProperties (System.ComponentModel.PropertyDescriptor[] cache, System.Object dataItem) [0x0001a] in <e6ac3c4d7fe1491da2402c546c0c1c72>:0 
  at System.Web.UI.WebControls.GridView.CreateRowDataKey (System.Web.UI.WebControls.GridViewRow row) [0x0001a] in <e6ac3c4d7fe1491da2402c546c0c1c72>:0 
  at System.Web.UI.WebControls.GridView.CreateChildControls (System.Collections.IEnumerable data, System.Boolean dataBinding) [0x00354] in <e6ac3c4d7fe1491da2402c546c0c1c72>:0 
  at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding (System.Collections.IEnumerable data) [0x00018] in <e6ac3c4d7fe1491da2402c546c0c1c72>:0 
  at System.Web.UI.WebControls.GridView.PerformDataBinding (System.Collections.IEnumerable data) [0x00000] in <e6ac3c4d7fe1491da2402c546c0c1c72>:0 
  at System.Web.UI.WebControls.DataBoundControl.InternalPerformDataBinding (System.Collections.IEnumerable data) [0x0001e] in <e6ac3c4d7fe1491da2402c546c0c1c72>:0 
  at System.Web.UI.WebControls.DataBoundControl.OnSelect (System.Collections.IEnumerable data) [0x00016] in <e6ac3c4d7fe1491da2402c546c0c1c72>:0 
  at System.Web.UI.DataSourceView.Select (System.Web.UI.DataSourceSelectArguments selectArgs, System.Web.UI.DataSourceViewSelectCallback callBack) [0x00020] in <e6ac3c4d7fe1491da2402c546c0c1c72>:0 
  at System.Web.UI.WebControls.DataBoundControl.PerformSelect () [0x00035] in <e6ac3c4d7fe1491da2402c546c0c1c72>:0 
  at System.Web.UI.WebControls.BaseDataBoundControl.DataBind () [0x00000] in <e6ac3c4d7fe1491da2402c546c0c1c72>:0 
  at System.Web.UI.WebControls.GridView.DataBind () [0x00012] in <e6ac3c4d7fe1491da2402c546c0c1c72>:0 
  at ASP.default_aspx.Page_Load (System.Object source, System.EventArgs e) [0x0000d] in <65bc5749736c4d01bd8dd9437aa15391>:0 
  at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00029] in <e6ac3c4d7fe1491da2402c546c0c1c72>:0 
  at System.Web.UI.Control.LoadRecursive () [0x00031] in <e6ac3c4d7fe1491da2402c546c0c1c72>:0 
  at System.Web.UI.Page.ProcessLoad () [0x0004a] in <e6ac3c4d7fe1491da2402c546c0c1c72>:0 
  at System.Web.UI.Page.ProcessPostData () [0x0004d] in <e6ac3c4d7fe1491da2402c546c0c1c72>:0 
  at System.Web.UI.Page.InternalProcessRequest () [0x001bf] in <e6ac3c4d7fe1491da2402c546c0c1c72>:0 
  at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00062] in <e6ac3c4d7fe1491da2402c546c0c1c72>:0
Comment 1 John Miller [MSFT] 2017-06-26 12:50:28 UTC
Hi Fredy,

Thanks for reporting this issue. I'm having trouble reproducing this with only the page you provided. Could you include more details on what needs to be setup to make this work? If you can, please include a complete project and detail instructions on any connections/database items that need setup. 


Note You need to log in before you can comment on or make changes to this bug.