.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

Error "Child list for field Project_Name cannot be created"

Posted By: Chiranjib     Posted Date: September 21, 2010    Points:2   Category :C#
I am getting the error "Child list for field Project_Name cannot be created"

The code

try
{
System.Data.SqlClient.SqlConnection con = new System.Data.SqlClient.SqlConnection(constring);
con.ConnectionString = "Data Source = .\\SQLEXPRESS; Initial Catalog=ProjectDetails; Integrated Security=True";
con.Open();
string sql = "select t1.Project_Name, t1.Delivery_Manager_Empid, t1.Delivery_Manager, t1.Project_Manager_Empid, t1.Project_Manager, t1.Project_ST_Date, t1.Project_End_Date, t1.Project_Type, t1.Account_Name from projectdetails.dbo.Project_Details as t1 where t1.Project_Name=" + "'" + linktext + "'";

System.Diagnostics.Debug.WriteLine(sql);

DataSet ds = new DataSet();
System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter(sql,con);

da.Fill(ds,"Project_Details");
//MessageBox.Show(sql);

Project_Name.DataBindings.Add(new System.Windows.Forms.Binding("Text", ds, "Project_Details_Add_Data.Project_Name"));
Project_Name.ReadOnly = true;
Project_Name.BackColor = Color.LightYellow;

}

catch (StackOverflowException ex)
{
MessageBox.Show(ex.ToString());
}

Responses

No response found. Be the first to respond this post
Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend