Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Data Binding / April 2007

Tip: Looking for answers? Try searching our database.

Column 'xxx' does not belong to table yyy

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Goldii - 20 Mar 2007 14:05 GMT
Hi all

First things first, I do not use multithreading to update any control, all re-marshalled onto the UI-thread. I do not rebind the control, I add/remove rows in the underlying tables, all on the UI-thread. The SqlConnection is not shared and it is contained in a "using" block (so hopefully isolated)

I have a Winform smartclient, a datagrid bound to a dataset with 2 data tables, one relation (AKA kind of drill down). I get exceptions below, regularly but not reproducible.

x) The column name in the exception can change between the exceptions.
x) It did not blow up at start but while it had been running, the code works fine so no errors in sql
x) I do not rename the column names nor alter the dataset schema
x) the call stack shows DataGridRelationshipRow, I assume this is because it is displaying a relation between 2 tables?
x) I cannot get the error on my machine but a colleagues does, different video cards (maybe faster redraw, worst redraw breakages?)
x) The WinForm has 2 datagrids being updated simultaneously, any pollution on result sets? any static variable contamination on grid?

any help appriciated
Martin

Column 'Status' does not belong to table ValuationBatch.
Source: System.Data.DataRow
Exception: System.ArgumentException
Process:
Stack Trace:
  at System.Data.DataRow.GetColumnError(String columnName)
  at System.Data.DataRowView.System.ComponentModel.IDataErrorInfo.get_Item(String colName)
  at System.Windows.Forms.DataGridRelationshipRow.PaintCellContents(Graphics g, Rectangle cellBounds, DataGridColumnStyle column, Brush backBr, Brush foreBrush, Boolean alignToRight)
  at System.Windows.Forms.DataGridRow.PaintData(Graphics g, Rectangle bounds, Int32 firstVisibleColumn, Int32 columnCount, Boolean alignToRight)
  at System.Windows.Forms.DataGridRelationshipRow.Paint(Graphics g, Rectangle bounds, Rectangle trueRowBounds, Int32 firstVisibleColumn, Int32 numVisibleColumns, Boolean alignToRight)
  at System.Windows.Forms.DataGrid.PaintRows(Graphics g, Rectangle& boundingRect)
  at System.Windows.Forms.DataGrid.PaintGrid(Graphics g, Rectangle gridBounds)
  at System.Windows.Forms.DataGrid.OnPaint(PaintEventArgs pe)
  at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)

Column 'Requester' does not belong to table ValuationItem.
Source: System.Data.DataRow
Exception: System.ArgumentException
Process:
Stack Trace:
  at System.Data.DataRow.CheckColumn(DataColumn column)
  at System.Data.DataRowView.GetColumnValue(DataColumn column)
  at System.Data.DataColumnPropertyDescriptor.GetValue(Object component)
  at System.Windows.Forms.DataGridColumnStyle.GetColumnValueAtRow(CurrencyManager source, Int32 rowNum)
  at System.Windows.Forms.DataGridTextBoxColumn.Paint(Graphics g, Rectangle bounds, CurrencyManager source, Int32 rowNum, Brush backBrush, Brush foreBrush, Boolean alignToRight)
  at System.Windows.Forms.DataGridRelationshipRow.PaintCellContents(Graphics g, Rectangle cellBounds, DataGridColumnStyle column, Brush backBr, Brush foreBrush, Boolean alignToRight)
  at System.Windows.Forms.DataGridRow.PaintData(Graphics g, Rectangle bounds, Int32 firstVisibleColumn, Int32 columnCount, Boolean alignToRight)
  at System.Windows.Forms.DataGridRelationshipRow.Paint(Graphics g, Rectangle bounds, Rectangle trueRowBounds, Int32 firstVisibleColumn, Int32 numVisibleColumns, Boolean alignToRight)
  at System.Windows.Forms.DataGrid.PaintRows(Graphics g, Rectangle& boundingRect)
  at System.Windows.Forms.DataGrid.PaintGrid(Graphics g, Rectangle gridBounds)
  at System.Windows.Forms.DataGrid.OnPaint(PaintEventArgs pe)
  at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
WQAndre - 06 Apr 2007 22:10 GMT
Hi Goldii,
I do have the same problems like you.
Did you find out something yet?
All hints are welcome
Andre

> Hi all
>
[quoted text clipped - 47 lines]
> ---
> Posted via DotNetSlackers.com
WQAndre - 10 Apr 2007 21:00 GMT
Hi,
I think I did find the problem.
I now make sure that a BindingSource used for a pickList in a combobox
column is assigned to before the BindingSource is assigned that has the
column in it.
Andre

> Hi Goldii,
> I do have the same problems like you.
[quoted text clipped - 53 lines]
> > ---
> > Posted via DotNetSlackers.com

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.