Subject Error: 335544421 when trying to backup the db on server from remote PC.
Author Adrian Wreyford
Hi, I've tired to backup a DB on remote server with the following code:

procedure TFormBackupRestore.SpeedButtonStartBackupClick(Sender: TObject);
var
j: integer;
lBackupService: TIBOBackupService;
lOptions: TBackupOptions;
lVerboseInfo: TStringList;
sFilepath: String;
begin
//if VerifyInputData() then
//begin
Screen.Cursor := crHourGlass;
lVerboseInfo := TStringList.Create;
lBackupService := TIBOBackupService.Create(nil);
try
// get destination server
//if cbBackupServer.Text <> FSourceServerNode.NodeName then
//begin
// lCurrChildNode := frmMain.tvMain.Items[0].GetFirstChild;
// while (lCurrChildNode <> nil) and (FDestServerNode = nil) do
// begin
// if TibcServerNode(lCurrChildNode.Data).NodeName = cbBackupServer.Text then
// FDestServerNode := TibcServerNode(lCurrChildNode.Data);
// lCurrChildNode := frmMain.tvMain.Items[0].GetNextChild(lCurrChildNode);
// end;
//end
//else
// FDestServerNode := FSourceServerNode;
try
lBackupService.LoginPrompt := false;
lBackupService.ServerName := PraxMainForm.IB_ConnectionPrax.Server;
lBackupService.Protocol := PraxMainForm.IB_ConnectionPrax.Protocol;
lBackupService.Params.Add('user_name='+PraxMainForm.IB_ConnectionPrax.Username);
lBackupService.Params.Add('password='+PraxMainForm.IB_ConnectionPrax.Password);
lBackupService.Attach();
except
on E:EIB_ISCError do
begin
DisplayMsg(ERR_SERVER_LOGIN, E.Message);
Screen.Cursor := crDefault;
if (E.ERRCODE = isc_lost_db_connection) or
(E.ERRCODE = isc_unavailable) or
(E.ERRCODE = isc_network_error) then
errorstate := True;//frmMain.ErrorState:= True;
//ErrorState := True;
Exit;
end;
end;

lOptions := [];
if lBackupService.Active = true then
{begin
if 'Non-Transportable' then
begin
Include(lOptions, NonTransportable);
end;
if sgOptions.Cells[OPTION_VALUE_COL,METADATA_ONLY_ROW] = GetLangText('True') then
begin
Include(lOptions, MetadataOnly);
end;
if sgOptions.Cells[OPTION_VALUE_COL,GARBAGE_COLLECTION_ROW] = GetLangText('False') then
begin
Include(lOptions, NoGarbageCollection);
end;
if sgOptions.Cells[OPTION_VALUE_COL,TRANSACTIONS_IN_LIMBO_ROW] = GetLangText('Ignore') then
begin
Include(lOptions, IgnoreLimbo);
end;
if sgOptions.Cells[OPTION_VALUE_COL,CHECKSUMS_ROW] = GetLangText('True') then
begin
Include(lOptions, IgnoreChecksums);
end;
if sgOptions.Cells[OPTION_VALUE_COL,CONVERT_TO_TABLES_ROW] = GetLangText('True') then
begin
Include(lOptions, ConvertExtTables);
end; }

lBackupService.Options := lOptions;


lBackupService.Verbose := true;
lBackupService.DatabaseName :=PraxMainForm.IB_ConnectionPrax.Database;
sFilePath := 'PRAX2008SERVER:c:\Prax2008\Data\Backup DB\Prax2008';
sFilePath := sFilePath + FormatDateTime('dd-mm-yy-hhmm',now)+ '.FBK';
lBackupService.BackupFile.Add(sFilePath);

//LabelBackupFiles.Caption := lBackupService.BackupFile.Text;

Screen.Cursor := crHourGlass;
try
lBackupService.ServiceStart;
The error pops up here!!
IBCShowServiceInfo(lBackupService, 'Database Backup');

while (lBackupService.IsServiceRunning) and (not gApplShutdown) do
begin
Application.ProcessMessages;
Screen.Cursor := crHourGlass;
end;

if lBackupService.Active then
lBackupService.Detach();
Application.ProcessMessages;
bBackup := True;
ModalResult := mrOK;
except
on E: EIB_ISCError do
begin
DisplayMsg(E.ERRCODE, E.Message);
if (E.ERRCODE = isc_lost_db_connection) or
(E.ERRCODE = isc_unavailable) or
(E.ERRCODE = isc_network_error) then
ErrorState:= True; //frmMain.ErrorState:= True;
ErrorState:= True;
exit;
end;
end;
finally
if lBackupService.Active then
lBackupService.Detach();
lBackupService.Free();
lVerboseInfo.Free;
Screen.Cursor := crDefault;
end;

The error 335544421 = Connection Rejected by remote interface.
I can connect to the server with same strings and use the db, it is just the backup that fails.

Any pointers will be welcomed.
Sorry for the long piece of code.

Regards

Adrian Wreyford


[Non-text portions of this message have been removed]