Hi, One of our dts package ran fine yesterday but failed today, I checked the package that it failed on the first task whcih is select a connection and then provide the SQL code to execute, we exec a stored proc. The error message is: Pending Batch Exists and Error source: Microsoft OLEDB Provider for SQL Server. If anybody has ideas about it? Thanks in advance! Jessie
It seemed that the error occured at the very beginning of the following stored proc ( I attached the beginning part one) such as if @pendingrecs > 0 and @nocheckforcurrentbatch <0 begin set @error_flag = 1 set @msg = 'pending Batch Exists' raiseerror (2msg, 16,1) return end CREATE PROCEDURE [dbo].[spLasermarkCardProcess] @NoCheckForCurrentBatch INT = -1 /* Release History 1.0 8/8/07: TEJ added Language Speaking Indicator flag */ AS BEGIN DECLARE @error_flag BIT SET @error_flag = 0 DECLARE @msg VARCHAR(200) DECLARE @pendingrecs INT SELECT @pendingrecs = COUNT(*) FROM [tblCardFile_Export_Lasermark] tcfel WHERE rowid NOT IN ( SELECT rowid FROM [tblCardFile_Export_LasermarkHistory] tcfelh ) IF @pendingrecs > 0 AND @NoCheckForCurrentBatch < 0 BEGIN SET @error_flag = 1 SET @msg = 'Pending Batch Exists' RAISERROR ( @msg, 16, 1 ) RETURN END