?
Solved

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

Posted on 2009-03-29
3
Medium Priority
?
719 Views
Last Modified: 2013-12-17
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.
0
Comment
Question by:deloused
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
djon2003 earned 1500 total points
ID: 24015565
I think that you are loading from database within the constructor of this usercontrol (the New method).

I'm suggesting you to change to loading from database from New to a method named Loading.. call this Loading in the Load event of the usercontrol.

Of then shall be able to put your control within designer view.
0
 

Author Comment

by:deloused
ID: 24018114
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

0
 
LVL 9

Expert Comment

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

Open in new window

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question