Link to home
Start Free TrialLog in
Avatar of deloused
deloused

asked on

Failed to create component, The column name is not valid error in visual studio

I'm getting the error:
Failed to create compnonent 'Test'.  The error mesage follows:
'The column name is not valid. [ Node name (if any) = , Column name = Paid ]'

What I'm trying to do is load a user control into a tabbed form.  It's not creating the component in the design view and gives me this error.  I've rebuilt the database and the typed data sets and everything is fine with the column in question.  I can even run my program and it works fine.  I need to get into design view for some formatting issues and am concerned that this could be causing other problems if I don't fix it.

I'm using Visual Studio 2008 and SQL Server 2005.  Any help with this error would be greatly appreciated.
ASKER CERTIFIED SOLUTION
Avatar of djon2003
djon2003
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of deloused
deloused

ASKER

I'm not sure if this helps but I've attached the code I'm working with now.  I think I'm already loading from the Load event.  I'm very new to windows apps, so I  appreciate any guidance.




protected override void OnLoad(EventArgs e)
        {
            BindData();
        }
 
public void BindData()
        { 
			ProjectOne.ProjectOneDatabaseDataSet.RecordNumberDataTable RecordNumberTable = new ProjectOneDatabaseDataSet.RecordNumberDataTable();
            RecordNumberTable = recordNumberTableAdapter.GetData();
 
            try
            {                  
				this.recordNumberTableAdapter.Fill(this.projectOneDatabaseDataSet.RecordNumber);
            }
            catch (System.Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.Message);
            }
		}

Open in new window

Could you try by adding this condition ?
protected override void OnLoad(EventArgs e)
        {
            if (this.DesingMode == false) BindData();
        }

Open in new window