Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Unable to get entityimage - Generic SQL error

Posted on by Microsoft Employee

In our production server we are trying to get entityimage with fetchXML and get generic sql error.

<fetch mapping="logical" >

    <entity name="contact" >
        <attribute name="birthdate" />
        <attribute name="firstname" />
        <attribute name="contactid" />
        <attribute name="lastname" />
        <attribute name="entityimage" />
        <filter type="and" >
            <condition attribute="contactid" operator="eq" value="{db747cc2-b9e0-e611-80d7-0050568be28a}" />
        </filter>
    </entity>
</fetch>


Trace Log output:

Crm Exception: Message: Generic SQL error., ErrorCode: -2147204784, InnerException: System.Data.SqlClient.SqlException (0x80131904): The data type image cannot be used as an operand to the UNION, INTERSECT or EXCEPT operators because it is not comparable.

I am wondering why this code work on our development server. on both server everything is the same.

And also when Read on Contact entity is at organization level it works.

*This post is locked for comments

  • Verified answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: Unable to get entityimage - Generic SQL error

    Hi,

    Please refer the following community thread.

    community.dynamics.com/.../211374

    Also refer the link below.

    community.dynamics.com/.../sql-server-error-when-downloading-word-template-dynamics-crm-2016-dynamics-365-for-enterprise

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans