Please start any new threads on our new 
    site at https://forums.sqlteam.com.  We've got lots of great SQL Server
    experts to answer whatever question you can come up with.
    
        | 
                
                    | 
                            
                                | Author | Topic |  
                                    | beyonder422Posting Yak  Master
 
 
                                        124 Posts | 
                                            
                                            |  Posted - 2008-07-24 : 09:23:19 
 |  
                                            | I am running some vbscripts and want to verify I can record any errors that occur.Below I have included a "forced error" sample that assigns the err.description to a global variable, and in a "failure" process flow I use that global variable as an input for a logging proc - lsited at bottom.  So far I am not seeing anything in my log.What am I doing wrong?'********************************************************************'  Visual Basic ActiveX Script'********************************************************************Function Main()	On Error Resume Next	DTSGlobalVariables("ReturnMessage") = ""	Dim objErr	Dim x	Dim y	Dim z	x = 15	y = 0	z = 0		z = x/y	If objErr.Number > 0 Then		DTSGlobalVariables("ReturnMessage") = objErr.Description		Main = DTSTaskExecResult_Failure	Else		DTSGlobalVariables("ReturnMessage") = "Good"		Main = DTSTaskExecResult_Success	End IfEnd FunctionI then have the "Failure" process flow goto an ExecuteSQL object where I want to utilzie the "ReturnMessage" variable as a proc input to log the error message.Parameter MappingInput Global Variables		Parameters"ReturnMessage"			"Parameter 1"usp_djs_log 'STZN - Error Log', ?Is this the correct method?Currently, I am not receiving any error message.I do not define what is obvious... |  |  
                                |  |  |  |