lConnection := TFDConnection.Create(
nil);
lTransaction := TFDTransaction.Create(
nil);
lScript := TFDScript.Create(
nil);
try
lConnection.ConnectionName := '
UPDATEROM';
lConnection.DriverName := '
IB';
lConnection.Params.Database := xDbNameInklPfad;
lConnection.Params.Password := '
masterkey';
lConnection.Params.UserName := '
SYSDBA';
lTransaction.Connection := lConnection;
lScript.Connection := lConnection;
lScript.Transaction := lTransaction;
try
lScript.Connection.StartTransaction;
lScript.ExecuteFile( xSqlScriptDatei);
lScript.Connection.Commit;
except
ShowMessage( '
FEHLER');
lScript.Connection.Rollback;
end;
finally
lConnection.Free;
lTransaction.Free;
lScript.Free;
end;