I am trying to automate exporting several RunSavedExport but I've come up against the " IDENTITY_INSERT is already on"
I have tried to call a pass-through query after each import as follows:
But the error still exists when I run the next Export.
Could anybody point me in the right direction ?
I have tried to call a pass-through query after each import as follows:
Code:
ALTER PROCEDURE [dbo].[IdentityMyTable]
AS
BEGIN
SET IDENTITY_INSERT [dbo].[tblMyTable] OFF
END
But the error still exists when I run the next Export.
Could anybody point me in the right direction ?