Groups | Blog | Home
all groups > sql server dts > april 2005 >

sql server dts : How ActiveX Script Task return customized error message?


Nick
4/6/2005 12:26:44 AM
Hello,

How can I return customized error string for the scheduler/manually excuting
to write to log/double click show error?

For example

'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************

Function Main()

If something wrong
' Some statements here to "return" a customized error message.
Main = DTSTaskExecResult_Failure
exit Function
end if

Main = DTSTaskExecResult_Success
End Function


Allan Mitchell
4/6/2005 6:33:36 AM
You can write to the log in an Active Script task

DTSPackageLog.WriteStringToLog "Nuts !!"

--



Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know


[quoted text, click to view]

nick
4/6/2005 7:39:10 AM


[quoted text, click to view]
nick
4/6/2005 8:19:01 AM
Thanks.
Where to find the log? I cannot find the "Nuts !!" message in Windows Event
Log, SQL log or the log file specified for the Job step....


[quoted text, click to view]
Darren Green
4/6/2005 10:10:53 AM
I also find Err.Raise can be quite effective.


--
Darren Green
http://www.sqldts.com
http://www.sqlis.com

[quoted text, click to view]

Allan Mitchell
4/6/2005 7:59:30 PM
Enable package logging.

Right Click on the design surface | Package Properties | Logging

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - SQL Server 2005 Integration Services.
www.Konesans.com


[quoted text, click to view]

AddThis Social Bookmark Button