List:General Discussion« Previous MessageNext Message »
From:Jef S Date:July 11 2003 1:21am
Subject:ANSI_NULLS and ANSI_WARNINGS
View as plain text  
Greetings to all,
 
Using a SELECT Statement, I am trying to pull information from two
separate databases. The query is being run from the database entitled
NETWORK and the other database is called DB1. The result set will be
displayed to a webpage using PHP in a table format. The problem is when
the page runs an error comes up concerning ANSI_NULLS and ANSI_WARNINGS.
The error is as follows:
 
Warning: MS SQL message: Heterogeneous queries require the ANSI_NULLS
and ANSI_WARNINGS options to be set for the connection. This ensures
consistent query semantics. Enable these options and then reissue your
query. (severity 16) 
 
After doing some research I found some information about setting
ANSI_NULLS and ANSI_WARNINGS to "on". However, when I do this it does
not work. The format I was given was.
 
SET ANSI_NULLS on;
SET ANSI_WARNINGS on;
GO;
CREATE PROCUDURE..
 
I am not using a procedure. I am using a SELECT Statement. If I add the
"GO" line, in the order listed above, to the code I get an error stating
that GO is not recognized. When I add both SET commands, in the order
listed above and without GO, I get the same WARNING that is listed
above.
 
Any help in this matter would be appreciated. Thank you in advance for
your assistance.
 
 
Jef
 

Thread
ANSI_NULLS and ANSI_WARNINGSJef S11 Jul