visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
262 experts, 1140 registered users, 1616 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

We now celebrate our 5 years of existence and break our frequentation records... Here are the stats of those 5 years.

Languages :: Delphi :: how to mysqldump with delphi ?


By: Nono Great Britain  Date: 24/03/2008 10:16:40  English  Points: 20 Status: Answered
Quality : Excellent
how to mysqldump with delphi ?
By: VGR Date: 24/03/2008 10:21:50 English  Type : Answer
hello,

there are probably more than one solution to this problem, but the first one I see is to stupidly execute the executable in the shell...

You may look into the Win API for ShExecute() but I designed a function ExecNewProcess() :

(parts of it were probably copy-pasted from some Delphi resource years ago, full credits go to it)

Function ExecNewProcess(ProgramName : String; doWait : Boolean = False) : Boolean; var StartInfo : TStartupInfo; ProcInfo : TProcessInformation; CreateOK : Boolean; begin { fill with known state } FillChar(StartInfo,SizeOf(TStartupInfo),#0); FillChar(ProcInfo,SizeOf(TProcessInformation),#0); StartInfo.cb := SizeOf(TStartupInfo); CreateOK := CreateProcess(nil, PChar(ProgramName), nil, nil,False, CREATE_NEW_PROCESS_GROUP+NORMAL_PRIORITY_CLASS, nil, nil, StartInfo, ProcInfo); { check to see if successful } if CreateOK then //may or may not be needed. Usually wait for child processes if doWait then WaitForSingleObject(ProcInfo.hProcess, INFINITE); ExecNewProcess:=CreateOK; end;



Do register to be able to answer

 Add This Article To:
 del.icio.usDel.icio.us  diggDigg  googleGoogle  spurlSpurl
 blinkBlink  wongWong  simpySimpy  yahooY! MyWeb 
EContact
browser fav
page generated in 4542.041060 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page