[Lazarus] Getting MySQL process output

Aradeonas aradeonas at operamail.com
Sat Dec 5 19:16:01 CET 2015


> is it maybe sent via something other than STDOUT? STDERR perhaps? for
> security
reasons maybe? Nothing! :|
> Process := TProcess.Create(nil);  with Process do  begin    Executable
> := '"C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin\mysql.exe" -u
> root -p';    with Parameters do    begin      Options := [poUsePipes,
> poNoConsole];    end;      Execute;  Sleep(1000);
> WriteLn(Process.Output.NumBytesAvailable); // will be 0 but it write
> "Enter password"    WriteLn(Process.Stderr.NumBytesAvailable);    //
> will be 0 but it write "Enter password"     end;

Regards, Ara


-- 
http://www.fastmail.com - IMAP accessible web-mail

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20151205/a55d9625/attachment-0003.html>


More information about the Lazarus mailing list