Курсовая работа: Реляційна база данних трудової книжки
Query8->SQL->Clear();
Query8->SQL->Add(" delete from z_algo_result ");
Query8->ExecSQL();
Query8->SQL->Clear();
Query8->SQL->Add(" insert into z_algo_result values(1,0,0,0,0)");
Query8->ExecSQL();
//vchiteli
Query4->Close();
Query4->Open();
char buf[30];
sprintf(buf,"%f",Query4->Fields->FieldByName("res")->AsFloat);
Query8->SQL->Clear();
Query8->SQL->Add(
x+" update z_algo_result set vchzarp="+buf
);
Query8->ExecSQL();
//sotrudnik inshi
if(Table1->Fields->FieldByName("issotrudnik")->AsInteger && RadioButton2->Checked){
sprintf(buf,"%f", DBText26->Caption.ToDouble() );
Query8->SQL->Clear();
Query8->SQL->Add(
x+" update z_algo_result set spivrobzarp = "+buf
);
Query8->ExecSQL();
}
//sotrudnik admin
if(Table1->Fields->FieldByName("issotrudnik")->AsInteger && RadioButton1->Checked){
sprintf(buf,"%f",Table1->Fields->FieldByName("admsotrstavka")->AsFloat * (1+DBText32->Caption.ToDouble()/100));
Query8->SQL->Clear();