public void Main()
{
// TODO: Add your code here
String[] DEPOSFiles = Directory.GetFiles(Dts.Variables["User::DirectoryPath"].Value.ToString());
if (
(DEPOSFiles.Length != 0))
{
Dts.Variables["User::FileExistsFlg"].Value = 1;
}
else
{
Dts.Variables["User::FileExistsFlg"].Value = 0;
}
bool fireAgain = false;
Dts.Events.FireInformation(1, "TEST!!!!!!!!!!!!!!!!!!", "Put a message here", "", 0, ref fireAgain);
Dts.TaskResult = (int)ScriptResults.Failure;
}
}
C:\Program Files\Microsoft SQL Server\100\DTS\Binn> dtexec.exe /File "C:\Users\Documents\Visual Studio 2008\projects\DTEXE_TEST\DTEXE_TEST\dtexe_test.dt
sx"
Microsoft (R) SQL Server Execute Package Utility
Version 10.50.1600.1 for 32-bit
Copyright (C) Microsoft Corporation 2010. All rights reserved.
Started: 10:41:33
Error: 2014-02-07 10:41:33.96
Code: 0x00000008
Source: Script Task
Description: The script returned a failure result.
End Error
Warning: 2014-02-07 10:41:33.96
Code: 0x80019002
Source: dtexe_test
Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution
method succeeded, but the number of errors raised (1) reached the maximum allow
ed (1); resulting in failure. This occurs when the number of errors reaches the
number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the e
rrors.
End Warning
DTExec: The package execution returned DTSER_FAILURE (1).
Started: 10:41:33
Finished: 10:41:33
Elapsed: 0.125 seconds
C:\Program Files\Microsoft SQL Server\100\DTS\Binn> dtexec.exe /File "C:\Users\L
IDC666\Documents\Visual Studio 2008\projects\DTEXE_TEST\DTEXE_TEST\dtexe_test.dt
sx"
Microsoft (R) SQL Server Execute Package Utility
Version 10.50.1600.1 for 32-bit
Copyright (C) Microsoft Corporation 2010. All rights reserved.
Started: 10:46:32
DTExec: The package execution returned DTSER_SUCCESS (0).
Started: 10:46:32
Finished: 10:46:32
Elapsed: 0.11 seconds
C:\Program Files\Microsoft SQL Server\100\DTS\Binn>
"TEST!!!!!!!!!!!!!!!!!!",in the command prompt window when a package run from DTEXEC.EXE fails?
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
From novice to tech pro — start learning today.
/REP V