Hi there. One of my clients upgraded from SQL 2000 to 2008 about a month ago. Mostly everything worked, but there are some wierd issues. This one's had me scratching my head all day. I have a stored procedure:ALTER PROCEDURE [dbo].[usp_UpdateEmployee]/* Public */@EmployeeID int,@FirstName nvarchar(20),@MI nvarchar(1) = NULL,@LastName nvarchar(25),@NickName nvarchar(25) = NULL,@EmployeeTitle nvarchar(100),@EWorkPh nvarchar(25) = NULL,@EmailAddress nvarchar(30) = NULL,@DeptID nvarchar(7),@InstructorID bit = 0,@LLInstructorID bit = 0,@MInstructorID bit = 0,@AmbassadorID bit = 0,@EagleSquadID bit = 0,/* Private */@LoginName nvarchar(50),@EmployeeTypeID tinyint,@ActiveID bit = 0,@HourlyID bit = 0,@IsSD bit = 0,@SDID int,@DateOfBirth smalldatetime,@GenderID bit = 0,@Address1 nvarchar(40),@Address2 nvarchar(40) = NULL,@City nvarchar(35),@State nvarchar(2),@Province nvarchar(40) = NULL,@Zip nvarchar(14),@Country nvarchar(50),@EHomePh nvarchar(25) = NULL,@EPagerPh nvarchar(25) = NULL,@PagerPin nvarchar(14) = NULL,@ECellPh nvarchar(25) = NULL,@DateOfHire smalldatetimeASBEGINUPDATE dbEmployeePublic.dbo.tblEmployeesPublicSET nvcEmpFirstName = @FirstName,nvcEmpMI = @MI,nvcEmpLastName = @LastName,nvcEmpNickName = @NickName,nvcEmpTitle = @EmployeeTitle,nvcEmpWorkPhone = @EWorkPh,nvcEmpEmailAddress = @EmailAddress,nvcEmpDepartmentID = @DeptID,bitEmpIsInstructor = @InstructorID,bitEmpLLInstructor = @LLInstructorID,bitEmpMUInstructor = @MInstructorID,bitEmpIsAmbassador = @AmbassadorID,bitIsEagleSquadron = @EagleSquadIDWHEREintEmployeeID = @EmployeeIDUPDATE dbEmployeePrivate.dbo.tblEmployeesPrivateSET nvcEmpLoginID = @LoginName,intEmployeeType = @EmployeeTypeID,bitEmpIsActive = @ActiveID,bitEmpIsHourly = @HourlyID,bitEmpIsSeniorDirector = @IsSD,intEmpSeniorDirectorID = @SDID,sdtEmpDOB = @DateOfBirth,bitEmpGender = @GenderID,nvcEmpAddress1 = @Address1,nvcEmpAddress2 = @Address2,nvcEmpCity = @City,nvcEmpState = @State,nvcEmpProvince = @Province,nvcEmpZip = @Zip,nvcEmpCountry = @Country,nvcEmpHomePhone = @EHomePh,nvcEmpPager = @EPagerPh,nvcEmpPagerPin = @PagerPin,nvcEmpCellular = @ECellPh,sdtEmpDOH = @DateOfHireWHEREintEmployeeID = @EmployeeIDEND
This used to work in 2000, but now it doesn't in 2008. The first UPDATE statement still works, but the second UPDATE doesn't. Both databases referenced are in the same SQL Server Instance. The first UPDATE references the same database that the stored procedure lives in. I've read tons of documentation today, Googled everything I could think of, and stared at the code for hours. Can you help?- Clay McKinney