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)

Business Portal "Incorrect syntax near ‘TO’"

(0) ShareShare
ReportReport
Posted on by 6,775

When trying to convert a Requisition to a PO. Query Error. Microsoft.BusinessFramework.Data.GeneralDatabaseException Incorrect syntax near ‘TO’

Tried the KB article asking you to reset IIS, but no luck. 

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    We are experiencing this issue as well.  Were you able to find a resolution?

  • Bill Campbell Profile Picture
    12 on at

    John, since the original post was some time ago, could you post a screen shot of what your error message looks like.  It is often easier to see an error than to 'type an error'

    Thanks.

  • Community Member Profile Picture
    on at

    I am unfortunately not able to take a screenshot at this time.  However, our issue is identical to the original posting.  Our users attempt to convert requisitions into purchase orders in Business Portal and receive the exact error message:

    Query Error. Microsoft.BusinessFramework.Data.GeneralDatabaseException Incorrect syntax near ‘TO’

    This began on the first day of our new fiscal year.  We performed an upgrade from GP 2010 to 2013 during the last fiscal year which included a SQL upgrade as well.  We did not have this issue in the last fiscal year after the upgrade.

  • Rob Bernhardt Profile Picture
    on at

    If you want to troubleshoot yourself, you could look in the event viewer or do a sql trace.  They may offer some clues.  Otherwise, support is always happy to help.

    Thanks

    Rob

  • Suggested answer
    babubaskaran@outlook.com Profile Picture
    12 on at

    Hi John,

    Have you tried to open business portal on IE 8 or 9 and tried the above.

  • Suggested answer
    Community Member Profile Picture
    on at

    Yes, I have the same problem. I've run a SQL trace and I saw that is a missing comma in the order by (please see "_____")

    SELECT T0.[DocumentID],T0.[CompanyID],T0.[LineSequenceNumber],T0.[Item],T0.[ItemDescription],T0.[RequiredBy],T0.[UnitPrice],T0.[CompanyID],T0.[PricePrecision],T0.[CompanyID],T0.[Quantity],T0.[QuantityPrecision],T0.[UnitOfMeasure],T0.[ExtendedPrice],T0.[CompanyID],T0.[Site] FROM [DYNAMICS]..[ReqMgmtLines] T0 WITH (NOLOCK) 
    WHERE ((T0.[Vendor] = @p0) AND ((T0.[CompanyID] = @p1) AND ((T0.[PurchaseOrderDocument] = @p2) AND (T0.[LineStatus] = @p3)))) 
    ORDER BY T0.[Item] ASC,T0.[ItemDescription] ASC,T0.[UnitOfMeasure] ASC,T0.[Site] ASC,T0.[UnitPrice] _____ T0.[PricePrecision],T0.[RequiredBy] DESC,T0.[DocumentID] ASC,T0.[CompanyID] ASC,T0.[LineSequenceNumber] ASC 

    With the "iisreset" option doesn't work this time for me but restarting the BP site worked fine!

    Under the "Internet Information Services (IIS) Manager", select the "Business Portal" site, and on the rigth you'll find "Manage Web Site". Just press "restart" and have a nice day!

    Regards

    E.

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