You need to call the method ShellExecute to run external applications.
you can also pass parameters with ShellExecute to the .exe you are calling

Example:
ShellExecute(Application.Handle,'open',vApplication,vParameter,'',SW_HIDE);

vApplication is the full path of the application I'm calling, in my example
let's say C:\myFolder\myApplication.exe, and vParameter is the Parameter I
want to pass to this application, let's say in this case 'P'. you can read
the ShellExecute help for more info. Note that vApplication and vParameter
are of type PCHAR. To convert a string to PCHAR you can use the following
statements

GetMem(vApplication,Length(vFilename)+1); // vFilename being the full file
path of type String
StrPCopy(vApplication,PChar(vFilename));

Hope it helps, you might also want to ask this in the Firebird group on
exact directions how and when to backup and restore your FDB.

Hope this helps
Vahan



-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] Behalf
Of soonhuat ong
Sent: Wednesday, July 27, 2005 8:47 AM
To: [email protected]
Subject: RE: [delphi-en] Backup and Restore


The following is what i've found from the manual :

backup database
----------------
echo backup Database... >> %BATLOGFILE%
gbak -B -t -user SYSDBA -pass masterkey  d:\newua\ua.gdb d:\newua\ua.bkp 2>
errout.tmp
echo 1> nul 2> empty.tmp
echo N 1> N_CR.tmp
comp errout.tmp empty.tmp 1> nul 2> nul < N_CR.tmp
if errorlevel 1 GOTO NOT_BACKEDUP
echo backup ua ok >> %BATLOGFILE%

restore database
---------------
echo restore Database... >> %BATLOGFILE%
gbak -R -user SYSDBA -pass masterkey  -c -p 8192 d:\newua\ua.bkp
d:\newua\ua.gdb 2> errout.tmp
echo 1> nul 2> empty.tmp
echo N 1> N_CR.tmp
comp errout.tmp empty.tmp 1> nul 2> nul < N_CR.tmp
if errorlevel 1 GOTO NOT_RESTORED
echo restore train ok >> %BATLOGFILE%

But how am i goin to pass the parameter from my application, anyone ?

Vahan Yoghoudjian <[EMAIL PROTECTED]> wrote:
    Soonhuat...

    Firebird has its own backup and restore mechanism, you should probably
read the firebird manual on how to use those commands and call them from
your application with the necessary parameters.

Vahan

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] Behalf
Of soonhuat ong
Sent: Tuesday, July 26, 2005 3:24 AM
To: [email protected]
Subject: [delphi-en] Backup and Restore


Hi all,

I want to perform "backup and restore" function in my application after
button click, any idea where should i start ? and how to do this. For your
information, i'm using Firebird.

Thanks in advance.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]



----------------------------------------------------------------------------
----
YAHOO! GROUPS LINKS

  a..  Visit your group "delphi-en" on the web.

  b..  To unsubscribe from this group, send an email to:
   [EMAIL PROTECTED]

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


----------------------------------------------------------------------------
----




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



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]



SPONSORED LINKS
C programming language Computer programming languages The c programming
language C programming language List of programming languages Delphi
programmer

---------------------------------
YAHOO! GROUPS LINKS


    Visit your group "delphi-en" on the web.

    To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

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


---------------------------------



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]



SPONSORED LINKS C programming language  Computer programming languages  The
c programming language
      C programming language  List of programming languages  Delphi
programmer


----------------------------------------------------------------------------
----
YAHOO! GROUPS LINKS

  a..  Visit your group "delphi-en" on the web.

  b..  To unsubscribe from this group, send an email to:
   [EMAIL PROTECTED]

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


----------------------------------------------------------------------------
----




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



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to