skip to main content
Configuring the ADO Client : Using Interactive SQL for ADO : Redirecting Output from OLEDBISQL
 

Redirecting Output from OLEDBISQL

OLEDBISQL can be easily used from other processes to execute SQL commands to retrieve results, optionally using redirection to execute. This is facilitated by having OLEDBISQL output its results and errors to stdout and stderr respectively:
*All results, including the column names and the output values, are sent to the stdout.
*An error in executing a query is sent to stderr.
For example, the following command executes queries from the test.sql file and sends the output to output.txt and errors to errors.txt:

oledbisql -c test.sql > output.txt 2> errors.txt