M
Matthias Steinbart
Hi there,
I have generated some SQL script-files using the SQL-Enterprise Manager (for
creation of tables, stored procedures, etc.).
When running those script files through the isql or osql utility, I have the
possibility to capture the output to a file, which is sort of importand to
me.
What I'd like to do is to write a small utility (Windows app in c#) which
will execute my sql-script-files on the SQL server. Again, I need to capture
the output. Can this be done using an SqlCommand-object providing the
contents of each individual script-file as the command text or do I have to
use isql. In both ways I'd like to know how it is possible to capture the
output.
The output is actually only required if there have been errors during
batch-execution.
Any help is greatly appreceated. Thanks in advance.
Matthias
I have generated some SQL script-files using the SQL-Enterprise Manager (for
creation of tables, stored procedures, etc.).
When running those script files through the isql or osql utility, I have the
possibility to capture the output to a file, which is sort of importand to
me.
What I'd like to do is to write a small utility (Windows app in c#) which
will execute my sql-script-files on the SQL server. Again, I need to capture
the output. Can this be done using an SqlCommand-object providing the
contents of each individual script-file as the command text or do I have to
use isql. In both ways I'd like to know how it is possible to capture the
output.
The output is actually only required if there have been errors during
batch-execution.
Any help is greatly appreceated. Thanks in advance.
Matthias