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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 DTS ActiveX Task syntax problem

Author  Topic 

mcrors_calhoun
Starting Member

22 Posts

Posted - 2006-10-23 : 09:53:58
Hi

I am getting a syntax for the following piece of code.

Option Explicit

Function Main()
On Error GoTo GetAttachments_err

<some code>

GetAttachments_err:
MsgBox "An unexpected error has occurred." _
& vbCrLf & "Please note and report the following information." _
& vbCrLf & "Macro Name: GetAttachments" _
& vbCrLf & "Error Number: " & Err.Number _
& vbCrLf & "Error Description: " & Err.Description _
, vbCritical, "Error!"
Main = DTSTaskExecResult_Failure
Exit Function


I am unsure where the problem is but I keep getting a syntax error on the line

On Error GoTo GetAttachments_err

Can someone help please.

Thanks
   

- Advertisement -