Link to home
Start Free TrialLog in
Avatar of previewservices
previewservicesFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS

Can anyone help me in fixing this error. The MsSQL query works fine in a SQL query windows, but not in a PHP page. I have put SET ANSI_NULLS ON; SET ANSI_WARNINGS ON; SET NOCOUNT ON;  before the query but still no luck. Below is the error i get.

Warning: mssql_query() [function.mssql-query]: 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) in C:\inetpub\wwwroot\labs\test.php on line 18

Warning: mssql_query() [function.mssql-query]: Query failed in C:\inetpub\wwwroot\labs\test.php on line 18
A error occured: 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.
ASKER CERTIFIED SOLUTION
Avatar of previewservices
previewservices
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial