|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Throwing Errors In VB Script From SQL JobHi,
I am creating a SQL Job and using a VB Script inside of it. In the script, under certain conditions I throw an error. When I test the script under those conditions, I get notification the error occurred, but not what the specific error is. With TSQL commands inside a job, it allows you to append information like that into a file, but with VB Scripts it doesn't. Is there some other way to get what the error is when it occurs? I could write functionality in the VB Script to create a file and log to it, but wanted to see if something easier was out there. One way is to wrap all database calls inside of stored procedures. You
then use T-SQL error handling to catch any errors, returning the results to your app via output parameters, result sets, or return statements, etc. That way your code can branch according to the results returned. --Mary Show quote On 20 Jan 2006 08:57:05 -0800, "Doug" <dnlwh***@dtgnet.com> wrote: >Hi, > I am creating a SQL Job and using a VB Script inside of it. In the >script, under certain conditions I throw an error. > When I test the script under those conditions, I get notification the >error occurred, but not what the specific error is. With TSQL commands >inside a job, it allows you to append information like that into a >file, but with VB Scripts it doesn't. > Is there some other way to get what the error is when it occurs? I >could write functionality in the VB Script to create a file and log to >it, but wanted to see if something easier was out there. |
|||||||||||||||||||||||