Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2009-03-29
3
Medium Priority
?
750 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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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 and create new code templates in NetBeans IDE 8.0 for Windows.

609 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