Code: Select all
procedure TFirebirdDB.CreateFireBDB;
// This procedure connects to a default DB and then uses SQL to create a DB
var
TmpCnx : TSQLConnection;
begin
TmpCnx := TSQLConnection.Create(nil);
TmpCnx.DriverName := 'DevartInterbase';
TmpCnx.LibraryName := 'dbexpida40.dll';
TmpCnx.VendorLib := 'C:\Windows\System32\fbclient.dll';
TmpCnx.GetDriverFunc := 'getSQLDriverINTERBASE';
TmpCnx.Params.values['Database'] := IncludeTrailingPathDelimiter(fDBPath)
+ 'MASTER.fdb';
// Set the passwords
TmpCnx.LoginPrompt := false;
TmpCnx.Params.values['User_name'] := fmyUser;
TmpCnx.Params.values['Password'] := fmyPassword;
try
TmpCnx.open;
except
on E: Exception do
begin
MessageDlg(fDBPath + fDBName + '.fdb' + #13 + #10 +
'Master DB connection failure - call system administrator. ' + #13
+ #10 + 'Error Message: ' + E.Message, mtWarning, [mbOK], 0);
exit;
end;
end;
end;
"Unsupported on-disk structure for file ...\MASTER.FDB; found 32779, support 13