-1

I have a small Delphi 2009-application that serves as a way to call some SQL procedures and do some background work.

It can be called with a path to a text file containing a SQL statement as input parameter and executes it.

Now I want the Delphi-application to return an output value, a string.

I found how to deal with output values when calling applications from a batch file (How do I get the result of a command in a variable in windows?), but I don't know how to fill this value from within Delphi. Where in Delphi do I assign my string value to some kind of output parameter, so the calling batch file can use the value?

Thanks

Community
  • 1
  • 1
SonOfGrey
  • 241
  • 1
  • 4
  • 18

1 Answers1

1

Write it to the standard output:

Writeln(MyOutputText);
David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • 1
    ... so a batch file can capture that standard output and process it, for instance using pipes. – Rudy Velthuis Feb 02 '15 at 15:53
  • Ok thanks both, for the comments. I'll try that. Although I don't understand why my question needs to be downvoted two times...is it that stupid? – SonOfGrey Feb 03 '15 at 08:07