"Fam = '"+textBox1->Text+"'", Ulanish);
11.
int i = Komanda->ExecuteNonQuery();
12.
// i - kolichеstvo udalеnnix zapisеy
13.
if (i > 0){ MessageBox::Show("Familiya ustunidagi bo`yicha
topilgan yozuvlar '"+textBox1->Text+"*', o`chirildi");
14.
MBdan_uqish(); }
15.
if (i == 0) MessageBox::Show("Familiya ustunidagi bo`yicha
topilgan yozuvlar '"+textBox1->Text+"*', topilmadi"); }
16.
void MBdan_uqish(){
17.
NaborDannix = gcnew DataSet();
18.
Ulanish = gcnew OleDb:: OleDbConnection( "Data
Source=\"C:\\Oybek.mdb\";User " +
19.
"ID=Admin;Provider=\"Microsoft.Jet.OLEDB.4.0\";");
20.
Komanda = gcnew OleDb::OleDbCommand();
21.
// MB dan o‘qish:
22.
if (Ulanish->State == ConnectionState::Closed) Ulanish->Open();
23.
Adaptеr = gcnew OleDb::OleDbDataAdapter("Select * From
[talaba]", Ulanish);
202
Oybek Mallayev
24.
// DataSet ni SQL so‘rovlari natijasi bilan to‘ldirish
Do'stlaringiz bilan baham: |