Subject Re: [firebird-support] Running gbak from CreateProcess or ShellExecute
Author Robert martin
If you are using Delphi, why not just use the IBBackup / Restore components included as standard. These are simple shells for GBak any way.

Rob Martin
Software Engineer

phone 03 377 0495
fax 03 377 0496
web www.chreos.com
Wild Software Ltd
----- Original Message -----
From: Tom Munro Glass
To: firebird-support@yahoogroups.com
Sent: Tuesday, October 26, 2004 10:05 AM
Subject: [firebird-support] Running gbak from CreateProcess or ShellExecute


I need to run gbak on a remote Firebird server from a Delphi application. I
have tried using CreateProcess and ShellExecute but both of these methods are
giving a really strange problem. The backup works except that the backup
filename ends up with a spurious character on the end of it, e.g.
007222_SiteData4_DL1.fbkº

Below is the command I am trying to execute (note this is normally all one
line)

"C:\Program Files\Firebird\bin\gbak.exe" -backup -verbose -service
kingfisher:service_mgr -user SYSDBA -password masterkey
"D:\SiteData\007222\007222_SiteData4.fdb"
"D:\SiteData\007222\Backup\007222_SiteData4_DL1.fbk"

If I execute this with CreateProcess or ShellExecute, I get the same problem.
If I type this into a Win2K command prompt, it works correctly. I have also
put this exact text into a batch file, testgbak.bat. If I execute
testgbak.bat from a command prompt, it works, but if I execute testgbak.bat
from CreateProcess or ShellExecute the extra character is appended.

I have tried with and without double-quotes around the filenames, and it makes
no difference. I have also tried this with two different Firebird servers,
one running on Win2K and the other running on FreeBSD 4.10, with exactly the
same results on both.

The first two lines of output from gbak are:

gbak: readied database D:\SiteData\007222\007222_SiteData4.fdb for backup
gbak: creating file D:\SiteData\007222\Backup\007222_SiteData4_DL1.fbkº

I'm using Firebird 1.5.1 on both the client and servers.

Can anyone please explain this?

Tom Munro Glass


Yahoo! Groups Sponsor
ADVERTISEMENT





------------------------------------------------------------------------------
Yahoo! Groups Links

a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

b.. To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



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