[Lazarus] Getting MySQL process output

Michael Van Canneyt michael at freepascal.org
Sat Dec 5 17:11:13 CET 2015



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 run this without -WG command you can see that Lazarus
> cmd gets password message but could nopt write and it run conhost.exe.
> So I want to know how simulate a console.

Simple Loop:
  - Read from program output
  - interpret the output and
  - write to program input. 
That's all the "general" advice we can give.

Don't ever use LoadFromStream. 
It will try to load all data that is outputted by the program, 
and does not give you the possibility to write input.

Michael.




More information about the Lazarus mailing list