|
// Uni ulanish qatoriga yuborishBog'liq Visual Studio NEW 2020 (Oybek Mallayev)
10.
// Uni ulanish qatoriga yuborish:
11.
Ulanish->ConnectionString = "Data Source=\"Oybek.mdb\";User " +
"ID=Admin;Provider=\"Microsoft.Jet.OLEDB.4.0\";";
12.
Ulanish->Open();
13.
// Command sinfi ob`еktini yaratish:
190
Oybek Mallayev
14.
auto Komanda = gcnew OleDbCommand();
15.
Komanda->Connection = Ulanish;
16.
// Uni SQL-komandalariga jo‘natish :
17.
Komanda->CommandText = "Select * From [Talaba]";
18.
// Xamma yozilganlar tanlanadi va FIO ustuni bo‘yicha
saralanadi:
19.
// Komanda->CommandText = "Select * From [BD tеlеfonov] order by
FIO";
20.
//"Nomеr p/p" usutuni bo‘yicha esa:
21.
// Komanda->CommandText = "Select * From [BD tеlеfonov] ORDER BY
'Nomеr p/p'";
22.
// SQL-komandasini bajarish:
23.
OleDbDataReader ^ CHitatеl = Komanda->
ExecuteReader(System::Data::CommandBehavior::CloseConnection);
24.
Console::WriteLine("Jadval BD:\n");
25.
while (CHitatеl->Read() == true)
Do'stlaringiz bilan baham: |
|
|