web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Heterogeneousqueries requiere the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection.

(0) ShareShare
ReportReport
Posted on by 550

I am running a procedure with a linkserver and I have this error:

"Heterogeneousqueries requiere the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection.

I set the ANSI_NULL and ANSI_WARNINGS in my procedure but the error persist. I running the procedure in Great Plains by Visual Basic.

How Can I fix this issue?.

5672.Error.PNG

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Tim Wappat Profile Picture
    5,711 on at

    I think this is the same as this question:

    community.dynamics.com/.../47517

    So you need to create your own connection with the correct settings on the connection.

    Tim.

  • Suggested answer
    MG-16101311-0 Profile Picture
    26,225 on at

    There are usually two things you need to do at the same time to overcome this issue:

    1. You need to make sure you encase your stored procedure with the following:

    SET ANSI_NULLS ON
    GO
    SET ANSI_WARNINGS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE PROCEDURE dbo.SomeProcedure AS
    BEGIN
    
     -- do something
    
    END
    GO
    


    2. Next, you will want to use some sort of impersonation to access the linked server where the above procedure exists. Your stored procedure should perform actions locally on the server where you want to read, update, or write data. The call from your application should be to the stored proc on the linked server.

  • Carolina Hernandez Profile Picture
    550 on at

    I fix the ODBC with the parameters and run successful .

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans