Курсовая работа: Разработка базы данных флагов мира
DM.tbCountryCountry.Value := eCountry.Text;
DM.tbCountryCapital.Value := eCapital.Text;
DM.tbCountry.Post;
//ïîèñê ïåðâîãî ÿçûêà è çàïèñü â ãëàâíóþ òàáëèöó
DM.tbLanguage.Locate('Language', cbLanguage1.Text, []);
DM.tbMain.Filter := 'ID_Country = '+DM.tbCountryID.Text;
DM.tbMain.Filtered := True;
DM.tbMain.First;
while DM.tbMain.RecordCount > 0 do DM.tbMain.Delete;
DM.tbMain.Filtered := False;
DM.tbMain.IndexFieldNames := 'ID';
DM.tbMain.Last;
Temp := DM.tbMainID.Value;
DM.tbMain.Insert;
DM.tbMainID.Value := Temp + 1;
DM.tbMainID_Country.Value := DM.tbCountryID.Value;
DM.tbMainID_Language.Value := DM.tbLanguageID.Value;
DM.tbMain.Post;
//ïîèñê âòîðîãî ÿçûêà è çàïèñü â ãëàâíóþ òàáëèöó
if cbLanguage2.Text <> '--- íåò ---' then
begin
DM.tbLanguage.Locate('Language', cbLanguage2.Text, []);
DM.tbMain.Insert;
DM.tbMainID.Value := Temp + 2;
DM.tbMainID_Country.Value := DM.tbCountryID.Value;
DM.tbMainID_Language.Value := DM.tbLanguageID.Value;
DM.tbMain.Post;
end;
//ïîèñê òðåòüåîãî ÿçûêà è çàïèñü â ãëàâíóþ òàáëèöó