![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 "Nick" <nbdy9 (AT) hotmail (DOT) removethis.com> wrote in message news:OkM%23WDmOFHA.3560 (AT) TK2MSFTNGP14 (DOT) phx.gbl... 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 |
#4
| |||
| |||
|
|
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 "Nick" <nbdy9 (AT) hotmail (DOT) removethis.com> wrote in message news:OkM%23WDmOFHA.3560 (AT) TK2MSFTNGP14 (DOT) phx.gbl... 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 |
#5
| |||
| |||
|
|
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 "Nick" <nbdy9 (AT) hotmail (DOT) removethis.com> wrote in message news:OkM%23WDmOFHA.3560 (AT) TK2MSFTNGP14 (DOT) phx.gbl... 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 |
#6
| |||
| |||
|
|
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.... "Allan Mitchell" wrote: 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 "Nick" <nbdy9 (AT) hotmail (DOT) removethis.com> wrote in message news:OkM%23WDmOFHA.3560 (AT) TK2MSFTNGP14 (DOT) phx.gbl... 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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |