Also, ich habe das letztens gerade auch benötigt.
Bei mir funtioniert es so:
Delphi-Quellcode:
procedure TfrmMain.Button2Click(Sender: TObject);
begin
//IBOCreateDatabase;
IBCCreateDatabase('
d:\db\testibc.fdb');
end;
procedure TfrmMain.IBCCreateDatabase(
const ADBName:
string);
begin
// Erzeugen
IBCAdmin.Database := ADBName;
IBCAdmin.Server := '
127.0.0.1';
IBCAdmin.LoginPrompt := False;
IBCAdmin.Port := '
3053';
IBCAdmin.ClientLibrary := '
fbclient.dll';
IBCAdmin.Params.Clear;
IBCAdmin.Params.Add('
USER ''
SYSDBA''
');
IBCAdmin.Params.Add('
PASSWORD ''
masterkey''
');
IBCAdmin.Params.Add('
PAGE_SIZE 16384');
IBCAdmin.Params.Add('
DEFAULT CHARACTER SET NONE');
//IBCConnection.Params.Add('COLLATION UNICODE_CI');
IBCAdmin.CreateDatabase;
// Script
IBCConnection.Database := ADBName;
IBCConnection.ClientLibrary := '
fbclient.dll';
IBCScript.SQL.LoadFromFile('
akten.sql');
IBCScript.Connection := IBCConnection;
IBCConnection.Connected := True;
IBCScript.Execute;
end;
Windows 10, 64 bit (kene VM) - getestet mit
FB 2.59 und 3.05
Frank