troubleshooting Question

Verify that SET options are correct....

Avatar of dbaSQL
dbaSQLFlag for United States of America asked on
Microsoft SQL ServerMicrosoft SQL Server 2005Microsoft SQL Server 2008
17 Comments1 Solution7623 ViewsLast Modified:
The update procedure below works perfectly everywhere except through php.  When it is fired through the web layer, it fails with this:

Warning: mssql_query() [function.mssql-query]: message: UPDATE failed because the following SET options have incorrect settings: 'CONCAT_NULL_YIELDS_NULL, ANSI_WARNINGS, ANSI_PADDING'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations. (severity 16) in C:\Inetpub\dev\include\tableeditor_save.php on line 20

Warning: mssql_query() [function.mssql-query]: Query failed in C:\Inetpub\dev\include\tableeditor_save.php on line 20


There are no indexed views.  The Active attribute is bit, and there is a default constraint of 1.

Suggestions are appreciated.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROC [dbo].[usp_updateSymbolTable] (
 @SymbolID int,
 @newsymbolID int=NULL,
 @SymbolName VARCHAR(25)=NULL,
 @SymbolClass CHAR(1)=NULL,
 @Active bit=NULL
)
AS
SET NOCOUNT ON
/* Allows for the update of SymbolTable, as needed. */
BEGIN
	IF EXISTS(SELECT 1 FROM dbo.SymbolTable WHERE SymbolID = @SymbolID)
	BEGIN
	  UPDATE 
			dbo.SymbolTable
	  SET 
			SymbolName=COALESCE(@SymbolName,SymbolName),
			SymbolID=COALESCE(@newsymbolid,SymbolID),
			SymbolClass=COALESCE(@SymbolClass,SymbolClass),
			Active=COALESCE(@Active,Active)
	  WHERE 
			SymbolID = @SymbolID

		IF @@ERROR <> 0	
		BEGIN
			RAISERROR('Failed to update dbo.SymbolTable.',16,-1)
			RETURN;
		END
	END
	ELSE	
	BEGIN
		RAISERROR('The given @SymbolID does not exist.',16,-1)
		RETURN;
	END

END

SET NOCOUNT OFF


GO
ASKER CERTIFIED SOLUTION
RakeshBhandari

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 17 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 17 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros