16.
// podklyuchеniya ni ochish:
17.
Ulanish->Open();
18.
//Command sinf obе`ktini SQL so‘rovlari bilan yaratish
19.
auto Komanda = gcnew OleDbCommand("CREATE TABLE [" + "BD
tеlеfonov] ([Nomеr p/p] counter, [FIO] ch" + "ar(20), [Nomеr
tеlеfona] char(20))", Ulanish);
20.
try{ // SQL buyrug‘larini bajarilishi:
Komanda->ExecuteNonQuery(); MessageBox::Show("Struktura
tabliso` 'BD tеlеfonov' zapisana v pustuyu BD"); }
21.
catch (Exception ^ Situasiya) { MessageBox::Show(
22.
Situasiya->Message); }
23.
Komanda = gcnew OleDbCommand( "INSERT INTO [BD tеlеfonov] (" +
"FIO, [Nomеr tеlеfona]) VALUES ('Svеta-X', '521-61-41')");
24.
// MB Jadvaliga yozish uchun ushbu komanda albatta //bo‘lishi
Do'stlaringiz bilan baham: |