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 2005 Forums
 SSIS and Import/Export (2005)
 Returning SSIS errors to ASP.Net Application

Author  Topic 

gtjr92
Starting Member

15 Posts

Posted - 2009-01-21 : 10:12:34
I have a asp.net 2.0 web app. It executes the stored procedure which executes my Package below. All that works fine. However
if there is an error with the SSIS package it never returns any errors to .net in the web browser.
I tried returning the error code to no avail.
thanks in advance


alter Procedure [SSISImportTest]
@filenameparam varchar (100)
As
declare @cmd varchar(1000)

declare @filePathparam varchar(1000)


set @filePathparam = 'd:\myfiles\'



select @cmd = 'dtexec /SQL \ImportTest'
select @cmd = @cmd + ' /SET \Package.Variables[User::filePathparam].Properties[Value];' + @filePathparam
select @cmd = @cmd + ' /SET \Package.Variables[User::fileNameparam].Properties[Value];' + @fileNameparam



declare @returncode int
exec @returncode = master..xp_cmdshell @cmd
select @returncode

If @returncode <> 0
Begin
drop table importtmp
Return @returncode
Return ' Test Error'
End

   

- Advertisement -