Microsoft KB Archive/905861

From BetaArchive Wiki
Knowledge Base


You may receive an "Incorrect syntax near the keyword 'group'" error message when you run a program that was created by using the Microsoft CRM SDK in Microsoft CRM 1.2

Article ID: 905861

Article Last Modified on 9/8/2006



APPLIES TO

  • Microsoft CRM Software Development Kit, when used with:
    • Microsoft CRM 1.2
  • Microsoft CRM 1.2




SYMPTOMS

When you run a program that was created by using the Microsoft Business Solutions CRM Software Developers Kit (SDK) in Microsoft CRM 1.2, the program does not run. Additionally, you may receive the following error message:

80040e14

Incorrect syntax near the keyword 'group'.

CAUSE

This problem may occur when you run a program that is similar to the following program.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.

<fetch version='1.0' output-format='xml-platform' aggregate='true' mapping='logical' page='1' count='50'> 
    <entity name='activity'>
        <attribute name='activityid' />
        <attribute name='createdon' />

        
<filter type='or'>
    <filter type='and'> <!-- meeting -->
        <condition attribute='activitytypecode' operator='eq' value='142' />

        <filter type='or'>
            <condition attribute='actualend' operator='on-or-after' value='2005-07-04T12:42:30' />
            <condition attribute='scheduledstart' operator='on-or-after' value='2005-07-04T12:42:30' />
        </filter>
    </filter>

    <filter type='and'>
        <condition attribute='activitytypecode' operator='ne' value='142' />

        <filter type='or'>
            <filter type='and'>               
                <condition attribute='actualend' operator='on-or-after' value='2005-07-04T12:42:30' />
            </filter>

            <filter type='and'>
                <condition attribute='actualend' operator='null' />
                <condition attribute='modifiedon' operator='on-or-after' value='2005-07-04T12:42:30' />
            </filter>
        </filter>
    </filter>
</filter>

        <link-entity name='activityparty' from='activityid' to='activityid'>
            <attribute name='participationtypemask' aggregate='count' alias='number' />
            
            <filter>
                <condition attribute='partyid' operator='in'>
                    <value>{5DFDE5AB-75DE-4EB0-B896-5EAA56BC1769}</value>
                </condition>
            </filter>
        </link-entity>
<order attribute='createdon' descending='true' />
        
    </entity>
</fetch>

This example code creates a Transact-SQL statement on the Microsoft SQL Server side. Inside this statement, "group by" and "order by" Transact-SQL statements are used. This problem occurs when these statements are incorrectly used.

RESOLUTION

Microsoft CRM has a fix for this problem that is part of a cumulative update. The cumulative update information is described in the following Microsoft Knowledge Base article:

904435 Update Rollup 2 is available for Microsoft CRM 1.2


MORE INFORMATION

For more information about the terminology that is used to describe Microsoft software updates, click the following article numbers to view the articles in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates


887283 Microsoft Business Solutions CRM software hotfix and update package naming standards



Additional query words: crm12 crm1.2 sdk

Keywords: kbprogramming kbautomation kbmbsmigrate kbpubtypekc kbqfe kbhotfixserver KB905861