Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Returing Sproc/SSIS to web browser

Status
Not open for further replies.

lisat76

Programmer
Sep 25, 2007
89
US
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

Code:
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top