Subject | Re: [firebird-support] how do i run gbak from delphi |
---|---|
Author | Helen Borrie |
Post date | 2004-07-17T23:55:22Z |
At 07:24 PM 17/07/2004 +0000, you wrote:
directory where gbak is located, it should resolve to
gbak -b -user sysdba -pass masterkey drive:\path\filenameOfDatabase
drive:\path\filenameOfBackupfile
i.e., you can't use the local gbak syntax with a network method - you'd
need to invoke the Service Manager in order to use your
IB_Connection.DatabaseName (localhost:drive:\path\filenameOfDatabase). If
you are going to using properties from within an IBO application, use the
Path property.
to gbak.exe either in the shellexecute string or in an application resource
string.
Better still, don't try to use shellexecute, which is likely to give you
problems with spaces in the gbak path string, e.g. Program Files. Instead,
use the IBOBackupService component from the IBOAdmin suite of Lorenzo
Mengoni (www.mengoni.it)
/heLen
>HiThere are some syntax errors in this gbak command. When run from the
>
>I am trying to run gbak from delphi using:
>shellexecute(form1.handle,'open',pchar
>(backupStr),nil,nil,sw_shownormal);
>
>where backupStr:= 'gbak [-b] -user sysdba -pass masterkey '+
>IB_connection1.databaseName +'backup18_07_04.gbk'
>
>but nothing appears to be happining.
directory where gbak is located, it should resolve to
gbak -b -user sysdba -pass masterkey drive:\path\filenameOfDatabase
drive:\path\filenameOfBackupfile
i.e., you can't use the local gbak syntax with a network method - you'd
need to invoke the Service Manager in order to use your
IB_Connection.DatabaseName (localhost:drive:\path\filenameOfDatabase). If
you are going to using properties from within an IBO application, use the
Path property.
>I have copied gbak.exe andPut gbak and fbclient.dll back where they belong and name the absolute path
>fbclient.dll into the directory of the exe. The directory is on the
>same drive as firebird has been installed on.
>
>Can anyone suggest where it is going wrong?
to gbak.exe either in the shellexecute string or in an application resource
string.
Better still, don't try to use shellexecute, which is likely to give you
problems with spaces in the gbak path string, e.g. Program Files. Instead,
use the IBOBackupService component from the IBOAdmin suite of Lorenzo
Mengoni (www.mengoni.it)
/heLen