Posted by John Bell on 10/01/05 12:42
Hi
Look at using the -b flag when you call osql, there is more information in
Books Online.
John
<lvpaul@gmx.net> wrote in message
news:1128067412.114048.12840@g44g2000cwa.googlegroups.com...
I am using SQL Server 2000. I have some files with SQL-Statements.
The SQL-Serveragent runs jobs which execute the SQL-Files:
(e.g. osql /E /n /i \\server\d$\lager_pool.sql)
How can I implement an error handling.
If an error occurs, the script stops, and I can't read the variable
@error
My script - table xy doesn΄t exist
SELECT * FROM XY
SELECT @@error
SELECT 33
The execution stops with an error after the first line
Thanks for your help.
aaapaul
Navigation:
[Reply to this message]
|