IDENTITY_INSERT Error
We have recently migrated to Coldfusion 8 and have found that certain ALTER SQL commands that ran just fine in our old Coldfusion 7 environment will generate errors in CF8. We verified that all permission are given in both Coldfusion 8 Administrator Datasource Settings and SQLServer 2005 for ALTER rights to this table but we continue to get the following error.
[Macromedia][SQLServer JDBC Driver][SQLServer]Cannot find the object "dbo.SCI_Group" because it does not exist or you do not have permissions.
Here is our SQL Query that we are executing:
DECLARE @BaSE INT
DECLARE @fyr INT
SET @BaSE = IDENT_CURRENT('dbo.SCI_Group')
SET @fyr = 2009
SET IDENTITY_INSERT dbo.SCI_Group ON
INSERT INTO SCI_Group
(ID, ParID, OldID, DowID, FYR, Name, Sort, Description, f_Input, f_Output, f_Enabled, f_Parent)
SELECT
ID + @BaSE,
ParID + @BaSE,
ID,
DowID,
@fyr,
Name,
Sort,
Description,
f_Input,
f_Output,
f_Enabled,
f_Parent
FROM
SCI_Group
WHERE
FYR = (@fyr - 1)
SET IDENTITY_INSERT dbo.SCI_Group OFF
Any insight from prior experience on this error type is much appreciated.
Thanks!
Mike
