Курсовая работа: Создание базы данных "Wc3 Cybersport Data Base"
end;
end;
procedure TForm1.ListBox1DblClick(Sender: TObject);
var
x,i:integer;
issecond : boolean;
begin
// ----- Organizing Query from selected in Listbox ----
MyQuery1.Active:=false;
MyQuery2.Active:=false;
MyQuery1.SQL.Clear;
MyQuery2.SQL.Clear;
issecond:=false;
For x:=0 to listbox1.Items.Count-1 do begin
If listbox1.Selected[x] then begin
Name:=Listbox1.Items.Strings[x];
For i:=0 to strtoint(ini.ReadString(Listbox1.Items.Strings[x],'0',''))-1 do
begin
if ini.ReadString(Listbox1.items.strings[x],inttostr(i+1),'') = 'Query2' then issecond:=true;
if not ((ini.ReadString(Listbox1.items.strings[x],inttostr(i+1),'') = 'Query2') or (issecond)) then MyQuery1.SQL.Add(ini.ReadString(Listbox1.Items.Strings[x],inttostr(i+1),''));
if not ((ini.ReadString(Listbox1.items.strings[x],inttostr(i+1),'') = 'Query2') or (issecond=false)) then MyQuery2.SQL.Add(ini.ReadString(Listbox1.Items.Strings[x],inttostr(i+1),''));
end;
end;
end;
MyQuery1.Active:=true;
If not (MyQuery2.SQL.text='') then begin
MyQuery2.Active:=true;
DBGrid1.DataSource:=Datasource5;
Normalize(DbGrid1,datasource5);