You are here: Error handling when calling external sql-Files « MsSQL Server « IT news, forums, messages
Error handling when calling external sql-Files

Posted by lvpaul on 09/30/05 11:03

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация