System::EventArgs^ e){
12.
// MB dan o‘qish:
13.
if (Ulanish->State == ConnectionState::Closed) Ulanish->Open();
14.
Adaptеr = gcnew OleDb::OleDbDataAdapter("Select * From
[talaba]", Ulanish);
15.
// DataSet ni SQL so‘rovlari natijasi bilan to‘ldirish
16.
Adaptеr->Fill(NaborDannix, "talaba");
17.
String ^ StrokaXML = NaborDannix->GetXml();
18.
dataGridView1->DataSource = NaborDannix;
19.
dataGridView1->DataMember = "talaba";
20.
Ulanish->Close();
}
21.
private: System::Void button2_Click(System::Object^ sender,
System::EventArgs^ e) {// MB ni yangilash
22.
Komanda->CommandText = "UPDATE [talaba] SET [Fam] = ?, Ism = ?,
Sharf = ?, "+ "Tug_sana = ?, Telefoni = ? WHERE ([id] = ?)";
23.
// Ustun nomlari, tiplari, o‘lchami, ustun nomlari
24.
Komanda->Parameters->Add("Fam", OleDb::OleDbType::VarWChar, 50,
"Fam");
25.
Komanda->Parameters->Add( "Ism", OleDb::OleDbType::VarWChar, 50,
"Ism");
199
Oybek Mallayev
26.
Do'stlaringiz bilan baham: |