procedure TForm1.FormCreate(Sender: TObject);
begin
if FileExists(ExtractFilePath(Application.ExeName)+'
ELP.fdb')
then
begin
IBCTable1.TableName := '
EINSATZ';
IBCTAble1.Active := true;
end else
begin
IBCConnection1.Database := ExtractFilePath(Application.ExeName)+'
ELP.fdb';
IBCConnection1.Params.Clear;
IBCConnection1.Params.Add('
USER ''
SYSDBA''
');
IBCConnection1.Params.Add('
PASSWORD ''
masterkey''
');
IBCConnection1.Params.Add('
PAGE_SIZE 4096');
IBCConnection1.Params.Add('
DEFAULT CHARACTER SET WIN1250');
IBCConnection1.CreateDatabase;
IBCConnection1.Connected := false;
IBCConnection1.Params.Clear;
IBCConnection1.Params.Add('
USER_NAME=SYSDBA');
IBCConnection1.Params.Add('
PASSWORD=masterkey');
IBCConnection1.Connected := true;
IBCTransaction1.Active := true;
with IBCQuery1
do
begin
SQL.Clear;
SQL.Add('
create table "EINSATZ"');
SQL.Add('
(');
SQL.Add('
ID autoinc,');
SQL.Add('
Gruppe char(20),');
SQL.Add('
Name char(30),');
SQL.Add('
Vorname char(30),');
SQL.Add('
Strasse char(30),');
SQL.Add('
Hausnr char(10),');
SQL.Add('
PLZ Char(10),');
SQL.Add('
Ort char(20),');
SQL.Add('
Telefon char(30),');
SQL.Add('
primary key(ID)');
SQL.Add('
)');
execsql;
end;