Subject Re: Running gbak from CreateProcess or ShellExecute
Author tom@tmgcon.com
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:

> It could be something as simple as CreateProcess having nowhere to
put the
> verbose output. Try adding the switch
> -y D:\SiteData\007222\Backup\007222_SiteData4_DL1.log
>
> to the end of the whole command and see whether that fixes it.
>
> btw, you just caused me to discover an error in the gbak switches
list in
> The Book. the -v switch abbreviates -verify, not -verbose. But gbak
> doesn't mind, it seems to ignore everything after the "v". I'd suggest
> either correcting "-verbose" to "-verify" anyway. Though it's a far
call,
> you never know but what someone might decide to add another switch like
> "-verbs_only" at some future point.
>
> ./heLen

Thanks heLen,

Using -y to redirect the output does make this work - at least the
backup file is created correctly, but now the log file ends up with
the extra character!

Thanks for the heads up on -v. I've now discovered that if I leave out
the -v option, the log file still gets created with the extra
character but with zero length.

So it seems as if the last parameter is always being corrupted. It
would be nice to find the cause of this, so if anyone has any more
ideas, I'd like to hear them. The really odd thing, as I said in my
original post, is that even if I put the command sting into a batch
file and execute that with CreateProcess, the same thing happens.

Tom