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;


      [B] DataRow findRow = thisDataSet.Tables["SchoolMoney"].Rows.Find(this.textBox1.Text);[/B]            if (findRow != null)
        {
            //            

        }

        thisConnection.Close();
    }
    }
}

can you tell me how i get the number of row about findRow
thank you

Recommended Answers

All 2 Replies

@"can you tell me how i get the number of row about findRow".
sorry,i am not able to make out what exactly you mean.
Can you explain a bit?

sorry i 've worked out it. thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.