السلام عليكم ورحمة الله وبركاتة
انا بتظهر عندى رسالة خطا لما بعمل binding للdata فى الtextboxes
ورسالة الحطا بتقول An unhandled exception of type 'System.ArgumentException' occurred in" system.windows.forms.dll
"Additional information: Cannot create a child list for field Search_Client".
code:
string m_connection = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=ClientsandMangers;Data Source=.";
private void Form1_Load(object sender, System.EventArgs e)
{
textBox1.DataBindings.Add("Text",this.Getdataset("Search_Client"),"Search_Client.Client_iD");
textBox2.DataBindings.Add("Text",this.Getdataset ("Search_Client"),"Search_Client.First_Name");
}
public DataSet Getdataset(string Sp_Name)
{
SqlConnection con = new SqlConnection(m_connection);
SqlCommand cmd = new SqlCommand ();
cmd.Connection = con;
cmd.CommandText = Sp_Name;
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter dr = new SqlDataAdapter ();
dr.SelectCommand = cmd;
DataSet ds = new DataSet();
dr.Fill (ds);
return ds;}
فياريت حد يخبرنى ماهو الحطا فى الكود.وجزاكم الله كل خير