Re: [Lazarus] Getting MySQL process output

2015-12-05 Thread Aradeonas
> 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   

Re: [Lazarus] Getting MySQL process output

2015-12-05 Thread wkitty42
On 12/05/2015 12:37 PM, Aradeonas wrote: Did you use the poNoConsole option ? Yes and NumByteAvailable is 0 but it write "Enter Password" message in console. I can understand why this message goes in Lazarus output or wherever except output of TProcess. is it maybe sent via something othe

Re: [Lazarus] Getting MySQL process output

2015-12-05 Thread Aradeonas
> Did you use the poNoConsole option ? Yes and NumByteAvailable  is 0 but it write "Enter Password" message in console. I can understand why this message goes in Lazarus output or wherever except output of TProcess. Regards, Ara -- http://www.fastmail.com - Access all of your messages and folde

Re: [Lazarus] Getting MySQL process output

2015-12-05 Thread Michael Van Canneyt
On Sat, 5 Dec 2015, Aradeonas wrote: What is the -WG param ? I could not find it in the documentation. Win32 GUI application in compiler option> conf and target If you are afraid that it will be visible in the task list, just set the MYSQL_PWD and USER environment variables in TProcess. Goo

Re: [Lazarus] Getting MySQL process output

2015-12-05 Thread Aradeonas
> What is the -WG param ? I could not find it in the documentation. Win32 GUI application in compiler option> conf and target > If you are afraid that it will be visible in the task list, just set > the MYSQL_PWD and USER environment variables in TProcess. Good point. > All in all, I suspect you wo

Re: [Lazarus] Getting MySQL process output

2015-12-05 Thread Michael Van Canneyt
On Sat, 5 Dec 2015, Aradeonas wrote: Simple Loop: - Read from program output - interpret the output and - write to program input. That's all the "general" advice we can give. Yea sure I do this and I have no problem with simple CMD programs. Problem is programs like MySQL that can be run

Re: [Lazarus] Getting MySQL process output

2015-12-05 Thread Aradeonas
> Simple Loop: - Read from program output - interpret the output and - write to program input. That's all the "general" advice we can give. Yea sure I do this and I have no problem with simple CMD programs. Problem is programs like MySQL that can be run from one line command and need reading

Re: [Lazarus] Getting MySQL process output

2015-12-05 Thread Michael Van Canneyt
On Sat, 5 Dec 2015, Aradeonas wrote: Simply said: You cannot. Sure it doable. For example alternative consoles can work with mysql with help of cmd and runs cmd and then run mysql with cmd and with that they get some kind of control but I dont how to do this with Lazarus. For example if you r

Re: [Lazarus] Getting MySQL process output

2015-12-05 Thread Aradeonas
> Simply said: You cannot. Sure it doable. For example alternative consoles can work with mysql with help of cmd and runs cmd and then run mysql with cmd and with that they get some kind of control but I dont how to do this with Lazarus. For example if you run this without -WG command you can see t

Re: [Lazarus] Getting MySQL process output

2015-12-05 Thread Michael Van Canneyt
On Sat, 5 Dec 2015, Aradeonas wrote: [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); 

[Lazarus] Getting MySQL process output

2015-12-05 Thread Aradeonas
[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