Курсовая работа: Информационная система военного округа

ADOTable1->Locate("Nomer_podrazdelenia",Edit2->Text,Opts);

if (ADOTable1->TableName==WideString("sostav"))

{

TLocateOptions Opts1;

Opts1.Clear();

Opts1<<loPartialKey<<loCaseInsensitive;

ADOTable1->Locate("kod_slugashego",Edit2->Text,Opts1);

}

}

//---------------------------------------------------------------------------

void __fastcall TForm1::Button6Click(TObject *Sender)

{

ADOTable1->Append();

Form2->Show();

}

//---------------------------------------------------------------------------

void __fastcall TForm1::Button7Click(TObject *Sender)

{

DataSource3->DataSet=ADOStoredProc1;

ADOQuery1->Active=false;

ADOQuery1->SQL->Clear();

ADOQuery1->SQL->Add("CREATE PROCEDURE proc2;1 as SELECT nazvanie_armii, COUNT(Nomer_podrazdelenia) AS col FROM chast GROUP BY nazvanie_armii HAVING COUNT(nazvanie_armii)>=ALL(SELECT COUNT(nazvanie_armii) FROM Chast GROUP BY nazvanie_armii)");

ADOStoredProc1->ProcedureName="proc2;1";

ADOQuery1->ExecSQL();

ADOStoredProc1->Active=false;

ADOStoredProc1->ExecProc();

ADOStoredProc1->Active=true;

ADOQuery1->SQL->Clear();

ADOQuery1->SQL->Add ("drop procedure proc2");

К-во Просмотров: 1263
Бесплатно скачать Курсовая работа: Информационная система военного округа