Tried put following in beginning of your script?

SET ANSI_NULLS ON;

SET ANSI_WARNINGS ON;