Error

(3 posts) (2 voices)

Tags:

No tags yet.

  1. ajitdixit, Member

    Could not execute the report. There was an error in the report.
    SQLSTATE: 42000, code: 7405
    message: message: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]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.

    This error when executed from MyDBR
    Or Else
    On management studio , it gets executed

    USE [MyDBR]
    GO

    DECLARE @return_value int

    EXEC @return_value = [dbo].[DIXIT_DBR_DOR006ALL]
    @FromDate = '20180501',
    @ToDate = '20180501'

    SELECT 'Return Value' = @return_value

    GO

    Help please

  2. myDBR Team, Key Master

    Hi,
    your SSMS and myDBR operate in different connection settings, hence the different behavior. myDBR's default for SQL Srver connection (defined in defaults.php) is:

    SET ANSI_WARNINGS OFF SET ARITHABORT OFF SET ANSI_NULLS ON

    If you are using Microsoft's sqlsrv-driver, you can define the connection initialization as:

    $mydbr_defaults['db_connection']['sqlsrv_server_init'] = 'SET ANSI_WARNINGS ON;SET ARITHABORT OFF;SET ANSI_NULLS ON;';

    --
    myDBR Team

  3. ajitdixit, Member

    Thanks
    The solution worked


Reply

You must log in to post.