Archive: Execute double query in PostgreSQL


Execute double query in PostgreSQL
Sorry, guys it is urgent, I searched yestarday, but couldn't find solution.
I have to make selection from a table and use the returned value. It seems nsExec::ExecToStack do this, but the query is not simple:

echo select ver_prop_option from versions where ver_prop_name='DB_VERSION'|C:\Program Files\PostgreSQL\8.1\bin\psql.exe -h localhost -U postgres MyDB

The point is to make selection without enter database edit mode. When I test it in command prompt works fine. When I try with nsis it returns "error" (the value of Pop $0).
So, can i see what error appears and is it possible to take the returned value that way ?
Thanks :)


echo requires cmd.exe /C at the beginning of nsExec command line, http://forums.winamp.com/showthread....hlight=COMSPEC


Thanks !
huh...it seems searching could never be "enough".
Thanks, just something more, what is the meaning of "/C" ? Just pointing the console, or something more ?
Thanks again :)


Use cmd /? to get command line processor help. On WIn98 this may be command.com, so better use sample with env. var from link above.