this means your datatable does not find the LastName column name that is in your database.
in your case, you populate your dataset with ds2 ..
Program.da2.Fill(Program.ds2);
and then you bind your data source to a βprogramβ like this.
Program.tblNamesBS2.DataSource = Program.ds.Tables[0];
he should like it ..
Program.tblNamesBS2.DataSource = Program.ds2.Tables[0];
because below the line you are looking for a value from Program.tblNamesBS2 that is bound to 'ds' and why the column is not in 'ds'.
customerfirstname.DataBindings.Add(new Binding("Text", Program.tblNamesBS2, "FirstName")); customerlastname.DataBindings.Add(new Binding("Text", Program.tblNamesBS2, "LastName"));
source share