Subject Re: [firebird-support] gfix and gstat
Author Uwe Grauer
Nols Smit wrote:

> When I execute the command in a Dos screen it works fine but when I
> execute
> it via Delphi (as shown below) then it's not creating the output file.
>
> s := 'gstat.exe -user SYSDBA -password masterkey -data
> ClientDB.gdb
> > stats.txt';
> StrPcopy(A,s);
> H := WinExec(A, SW_HIDE);
> if (H <= 32) then
> ShowMessage('Problem to execute gstat utility');
>
>
>
>
> ----- Original Message -----
> From: "Uwe Grauer" <mailinglists@...>
> To: <firebird-support@yahoogroups.com>
> Sent: 02 March, 2004 3:02 PM
> Subject: Re: [firebird-support] gfix and gstat
>
>
> > Nols Smit wrote:
> >
> > > Thanks, I forgot about that Dos switch. But if you know it than you
> > > must be
> > > more or less as old as I am :))
> > >
> > >
> > The reason i asked for the platform was, that i didn't know if gstat,
> > gfix worked on stdout or stderr
> > and i wasn't shure, if it is possible to redirect sdterr on Win.
> > As a *nix user, you would know that there is redirection on the
> > commandline.
> >
> > Uwe
> >
> >
> >

So you have to use a batch-file (doit.bat).
maybe you have to call it with 'cmd.exe doit.bat'.
Read the documentation about this.

There should be something like popen() in Delphi!
If so, use this.

Uwe