Problem with assigning value to variable
Depends on the connection type.
See
http://technet.microsoft.com/en-us/library/ms140355.aspx
Randy Aldrich Paulo
MCTS(BizTalk 2010/2006,WCF NET4.0), MCPD |
My Blog
BizTalk Message Archiving - SQL and File
SSIS Centralize Connection Repository
January 14th, 2012 8:52am
Hi actually my procedure is like below
ALTER procedure [dbo].[load_data]
@flag bit output
as
Begin
DECLARE @ErrorMessage VARCHAR(MAX)
BEGIN TRY
BEGIN Transaction
DECLARE @StartTime smallDatetime
SELECT @StartTime = GETDATE()
declare @runid int
select @runid=max(runid) from LoadTimes
INSERT INTO Table_A
(Id,Ename) values (49,'ABC')
commit transaction
END TRY
BEGIN CATCH
SET @ErrorMessage = Error_Message()
ROLLBACK TRANSACTION
END CATCH
IF (@ErrorMessage) IS NULL
BEGIN
INSERT INTO LoadTimes
(RunId,StepName,BeginTS,EndTS,Success,Error)
VALUES (1,'A',@StartTime,GETDATE(),1,Coalesce(@errormessage,''))
set @flag=1
end
ELSE
BEGIN
set @flag=0
INSERT INTO LoadTimes (RunId,StepName,BeginTS,EndTS,Success,Error)
VALUES (1,'A',@StartTime,GETDATE(),0,Coalesce(@errormessage,''))
END
END
Same way I have seven Execute SQL task in 1 st container
So Now any of the procedure like above will return flag =0 I want to redirect my flow to Sequence container 3 and if flag=1 I will redirect my flow to container 2 please help me for the same
Free Windows Admin Tool Kit Click here and download it now
January 15th, 2012 5:19am
You need to make use of Precedence constraint window, have that configured with option "Completed" and write expression for each of the condition and have relevant taskflow attached based on the output of the expression.
HTHPhani Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem.
January 15th, 2012 5:22am
I know abt precedence constarint but whatever o/p value I am getting from SP i need to assign it to package variable then I will use that variable value in prcedence4 constarint expression so first i need help for how to assign value and second thing
let's say in each container there are 8 SP so do i need to do same practice for for each execute sql task
Free Windows Admin Tool Kit Click here and download it now
January 15th, 2012 5:30am
In the Execute SQL Task -> Click Parameter Mapping -> Map the output here to a variable.Randy Aldrich Paulo
MCTS(BizTalk 2010/2006,WCF NET4.0), MCPD |
My Blog
BizTalk Message Archiving - SQL and File
SSIS Centralize Connection Repository
January 15th, 2012 5:45am
I did it but if i put -1 in parameter name then it shows me that value doesn't come in expected range so what should i put
Free Windows Admin Tool Kit Click here and download it now
January 15th, 2012 5:47am