Don i think your EXC command needs to do everything all together; you can separate commands with a semi colon, which is rumored to be mandatory in a future version of SQL.
this works for example:
CREATE TABLE IDDemo
( pk_ID Integer IDENTITY(1,1)
, Textdata Varchar(100) )
EXEC ('SET IDENTITY_INSERT IDDemo ON;INSERT IDDemo (pk_ID, Textdata) Values (4, ''This works too'');SET IDENTITY_INSERT IDDemo OFF;')
SELECT * FROM IDDemo
Lowell