Курсовая работа: Создание базы данных "Wc3 Cybersport Data Base"
ini :Tinifile;
implementation
uses Unit2;
{$R *.dfm}
Procedure TForm1.Normalize(Grid:TDBGrid; Source:TDatasource);
var
x:integer;
i:integer;
Begin
// ----------- Normalizing Column Width of DBGrid -----------
For x:=0 to grid.Columns.Count-1 do begin
i:=0;
source.DataSet.First;
repeat
if length(source.DataSet.Fields[x].Text)>i then i:=length(source.DataSet.Fields[x].Text);
source.DataSet.next;
until source.DataSet.Eof;
grid.Columns.Items[x].Width:= i+25;
end;
source.DataSet.First;
end;
Procedure TForm1.NewQuery(Name:string; Query :Trichedit; Dodelete : integer);
// DoDelete = 0 - Add or Edit
// DoDelete = 1 - Delete Query
Var
F : TextFile;
i : Integer;
x : Integer;
begin