![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I've had a strange problem. Can anyone confirm? SQL2K, version: 8.00.760 Stored procedure: ================= CREATE PROCEDURE dbo.myProc @myID int OUTPUT AS SET NOCOUNT ON SET @myID = 123 --reseed with myTable with new Identity DBCC CHECKIDENT ('myTable', RESEED, @myID) GO In the DTS, SQL Task ===================== DECLARE @myID int EXEC myProc @myID OUTPUT SELECT @myID AS MaxNewID I initialize a global variable with the result of the select, as instructed here: http://www.sqldts.com/default.aspx?234 Problem: ======== When DBCC is commented out in the SP code, global var is init OK. When DBCC is executed, the DTS skip the global var initialization (which then always keeps the previous value). Question: ========= What I did wrong and how to solve this? Thanks in advance. Zirco. |
![]() |
| Thread Tools | |
| Display Modes | |
| |