[Lazarus] Getting MySQL process output
Aradeonas
aradeonas at operamail.com
Sat Dec 5 13:58:57 CET 2015
[Cross posted on forum so if you want answer there : http://forum.lazarus.freepascal.org/index.php/topic,30635.0.html ]
Hi,
I want to play with MySQL process and get what ever it write to console
so I write this code:
> Process := TProcess.Create(nil); with Process do begin
> Executable := 'C:\Program Files (x86)\MySQL\MySQL Server
> 5.5\bin\mysql.exe'; with Parameters do begin Options :=
> [poUsePipes]; Add('-u'); Add('root'); Add('-p');
> end; Execute; while Process.Running do
> Memo1.Lines.LoadFromStream(Process.Output); end;
But the problem is that this will freeze because there is no output but
console window write :
> Enter password:
How can I get this in my application and all others?
As I said I want to work with MySQL executable and read from and write
in it, So I dont want to use its library or any other DB component.
Regards, Ara
--
http://www.fastmail.com - Choose from over 50 domains or use your own
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20151205/84eab4d3/attachment-0002.html>
More information about the Lazarus
mailing list