about DataRow
-
OleDbConnection thisConnection = new OleDbConnection( @"Provider = Microsoft.Jet.OLEDB.4.0;Data Source=e:\DataMoney.mdb"); OleDbDataAdapter thisAdapter = new OleDbDataAdapter( "SELECT * FROM SchoolMoney", thisConnection); DataSet thisDataSet = new DataSet(); thisAdapter.Fill(thisDataSet, "SchoolMoney"); OleDbCommandBuilder thisBuilder = new OleDbCommandBuilder(thisAdapter); thisBuilder.QuotePrefix = "["; thisBuilder.QuoteSuffix = "]"; //set up keys object for defining primary key DataColumn[] keys = new DataColumn[1]; keys[0] = thisDataSet.Tables["SchoolMoney"].Columns[0]; thisDataSet.Tables["SchoolMoney"].PrimaryKey = keys; DataRow findRow = thisDataSet.Tables["SchoolMoney"].Rows.Find(this.textBox1.Text); if (findRow != null) { // } thisConnection.Close(); } } } can you tell me how i get the number of row about findRow thank you
-
OleDbConnection thisConnection = new OleDbConnection( @"Provider = Microsoft.Jet.OLEDB.4.0;Data Source=e:\DataMoney.mdb"); OleDbDataAdapter thisAdapter = new OleDbDataAdapter( "SELECT * FROM SchoolMoney", thisConnection); DataSet thisDataSet = new DataSet(); thisAdapter.Fill(thisDataSet, "SchoolMoney"); OleDbCommandBuilder thisBuilder = new OleDbCommandBuilder(thisAdapter); thisBuilder.QuotePrefix = "["; thisBuilder.QuoteSuffix = "]"; //set up keys object for defining primary key DataColumn[] keys = new DataColumn[1]; keys[0] = thisDataSet.Tables["SchoolMoney"].Columns[0]; thisDataSet.Tables["SchoolMoney"].PrimaryKey = keys; DataRow findRow = thisDataSet.Tables["SchoolMoney"].Rows.Find(this.textBox1.Text); if (findRow != null) { // } thisConnection.Close(); } } } can you tell me how i get the number of row about findRow thank you