hi all
already have DataTable in form1.then how to use this DataTable from form2
i'am used form1 code is at below. in C#
studentsDetBindingSource = new BindingSource();
studentsDetTableAdapter = new SqlDataAdapter();
//
sqlCmd = new SqlCommand();
sqlCon = new SqlConnection(SqlSerConCla.SqlSerConStr());
sqlCmd.Connection = sqlCon;
sqlCmd.CommandType = CommandType.Text;
sqlCmd.Parameters.AddWithValue("@stuNam", this.stuNamTextBox.Text);
sqlCmd.CommandText = "SELECT * FROM studentsDet WHERE (stuNam = @stuNam)";
studentsDetTableAdapter = new SqlDataAdapter(sqlCmd);
//
studentsDetDataSet = new DataSet();
studentsDetDataSet.Tables.Add("studentsDet");
studentsDetDataSet.Tables["studentsDet"].Rows.Clear();
DataTable studentsdet = studentsDataSet.Tables["studentsDet"];
students.TableName = "studentsdet";
//
studentsDetTableAdapter.Fill(studentsdet);
studentsDetBindingSource.DataSource = studentsdet;
studentsDetBindingNavigator.BindingSource = studentsDetBindingSource;
studentsDetDataGridView.DataSource = studentsDetBindingSource;
//
this.studentsDetBindingSource.Sort = "stuNam ASC";
in dataset table, bindingsource and SQL Table too. how can do insert, delete and updates?. used form1's datatable. from form2
can possible it?.
if possible. can give me provide some code?
with best regards
NazHim