S
Steven C
Hello:
I am trying to append a dataset that draws its data from a MSDE
instance, and I keep getting the exception:
Can't create a child list for field tblCustomers.
conn = new SqlConnection("Data Source=SWC_K7\\CHRISMON1;User
Id=yadda;password=yadda;Initial Catalog=ChrismonContacts");
DataSet CustomersDS = new DataSet();
string lcSql = "SELECT * " +
"FROM tblCustomers " +
"WHERE active = 1";
SqlDataAdapter CustomersAdapter = new SqlDataAdapter(lcSql,conn);
CustomersAdapter.Fill(CustomersDS,"tblCustomers");
DataTable CustomersTable = CustomersDS.Tables["tblCustomers"];
DataRow NewCustomersRow = CustomersTable.NewRow();
NewCustomersRow["customername"] =
Convert.ToString(this.tbCompanyName.Text);
Is there an easy and obvious explanation for this error? The
tblCustomers table has an integer primary key named customerno
Thanks!
Steven
I am trying to append a dataset that draws its data from a MSDE
instance, and I keep getting the exception:
Can't create a child list for field tblCustomers.
conn = new SqlConnection("Data Source=SWC_K7\\CHRISMON1;User
Id=yadda;password=yadda;Initial Catalog=ChrismonContacts");
DataSet CustomersDS = new DataSet();
string lcSql = "SELECT * " +
"FROM tblCustomers " +
"WHERE active = 1";
SqlDataAdapter CustomersAdapter = new SqlDataAdapter(lcSql,conn);
CustomersAdapter.Fill(CustomersDS,"tblCustomers");
DataTable CustomersTable = CustomersDS.Tables["tblCustomers"];
DataRow NewCustomersRow = CustomersTable.NewRow();
NewCustomersRow["customername"] =
Convert.ToString(this.tbCompanyName.Text);
Is there an easy and obvious explanation for this error? The
tblCustomers table has an integer primary key named customerno
Thanks!
Steven