views:

73

answers:

2

Hey,

I'm using Visual Studio 2010 to create a webpage. I'm calling some tables from SQL Server 2008.

Here is where I'm confused...

The code runs fine with no errors. The pages work except I'm missing my rows in my 3rd column from the table. Everything else shows up.

Ive checked to make sure the names are matching everywhere and that in SQL the joins and such worked.

It's just very weird that I'd be missing my 2 rows from the 3rd column.

Anyone have any ideas to help??

The error is in the tab called research material

            else if (tabTagId == "tpArlington_ProjectInformation")
            {
                repArlington_ProjectInformation.DataSource = ds;
                repArlington_ProjectInformation.DataBind();
            }
            else if (tabTagId == "tpArlington_Plan")
            {
                repArlington_Plan.DataSource = ds;
                repArlington_Plan.DataBind();
            }
            else if (tabTagId == "tpArlington_ResearchMaterial")
            {
                repArlington_ResearchMaterial.DataSource = ds;
                repArlington_ResearchMaterial.DataBind();
            }



            else if (Session["projectAbbreviation"].ToString() == "ARLING")
            {
                tpArlington_ProjectInformation.HeaderText = "Project Information";
                tpArlington_ProjectInformation.Visible = true;
                tpArlington_Plan.HeaderText = "Plan";
                tpArlington_Plan.Visible = true;
                tpArlington_ResearchMaterial.HeaderText = "ResearchMaterial";
                tpArlington_ResearchMaterial.Visible = true;
                getTabData("tpArlington_ProjectInformation");
                getTabData("tpArlington_Plan");
                getTabData("tpArlington_ReasearchMaterial");
            }

The 2 other tabs work perfectly. The research material is where the problem is. The stuff in the tab doesn't come up. The text in the tab DOES come up but not the stuff from SQL.

The stuff in SQL looks good, the ids match, and everything is joined properly. Otherwise the other 2 tabs wouldn't work. That is what is confusing me.

Any suggestions or specific info you need just ask.

Thanks!

+1  A: 
 else if (Session["projectAbbreviation"].ToString() == "ARLING") 
            { 
                tpArlington_ProjectInformation.HeaderText = "Project Information"; 
                tpArlington_ProjectInformation.Visible = true; 
                tpArlington_Plan.HeaderText = "Plan"; 
                tpArlington_Plan.Visible = true; 
                tpArlington_ResearchMaterial.HeaderText = "ResearchMaterial"; 
                tpArlington_ResearchMaterial.Visible = true; 
                getTabData("tpArlington_ProjectInformation"); 
                getTabData("tpArlington_Plan"); 
                getTabData("tpArlington_ReasearchMaterial"); 
            } 

the last research was spelled wrong.

posting a snippet on here made it easier to read.

thanks for all the help guys it works now.

Which is why you should always use a string constant when it appears in more than one place! (Some would say even if it appears in just one place. :-))
MEMark
A: 

I will guess you are using a repeater to display the data (based in the control name), please make sure the "repArlington_Plan" control has these fields (the ones missing) defined. You might have all the data in the dataset, however, if you don't have a field to place it within your control then no data will be displayed.

Good luck!

Ricardo