I'm trying to rebuild a database from a text file, using VBA. To insert the ID values, I call this before sending in the INSERTs:
SET IDENTITY_INSERT TableName ON
This seems to work fine for most TableNames, but when I call it on table 'Accounts' I get an interesting error:
"IDENTITY_INSERT is already ON for table 'test.dbo.PropertyAssets'. Cannot perform SET operation for table 'Accounts'."
I'm guessing this has to do with fkey constraints or such, but does anyone know for sure?
PropertyAssets
but never turned it off.