Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Error message "Unclosed quotation mark after the character string" when running the Historical Aged Trial Balance for Payables Management in Microsoft Dynamics GP


Symptoms


When you run the Historical Aged Trial Balance report for Payables Management, you receive one of the following error messages:

Error Message 1

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1 : Incorrect syntax near 'XXXXX'.[Microsoft][ODBC SQL Server Driver][SQL Server]Unclosed quotation mark before the character string ' and DocumentType=5'.

Error Message 2

[Microsoft][SQL Native Client][SQL Server]incorrect syntax near 'S'[Microsoft][SQL Native Client][SQL Server] Unclosed quotation mark after the character string 'and DocumentType = 6"

This is followed by the following message:

The stored proc pmHistoricalAgedTrialBalance returned the following results: DBMS: 105, Microsoft Dynamics GP: 0

↑ Back to the top


Cause

These errors are caused by a known issue in Microsoft Dynamics GP where a credit memo or manual payment document is entered with an apostrophe in the Voucher Number field. 

↑ Back to the top


Resolution

Use one of the following methods to resolve this issue:

Resolution 1

1. Use SmartList to identify the credit memo or manual payment document(s) where the Voucher Number field contains an apostrophe. 

2. Void and re-enter the credit memo or manual payment without an apostrophe in the Voucher Number field. 

Resolution 2

If Resolution 1 is not feasible, open a support case for further assistance to locate the problem document. Note that locating the problem document may be a billable consulting expense to you. To reach Customer Service, telephone 888-477-7877, or visit the following Microsoft Web site:

https://mbs.microsoft.com/support/newstart.aspx

↑ Back to the top


More Information

To prevent this issue from happening in the future, you can lock the Voucher Number field to prevent users from modifying the voucher number. To do this, following these steps: 

1. Click Microsoft Dynamics GP, point to Tools, point to Setup, point to Purchasing, and then click Payables.

2. Unmark the Override Voucher Number at Transaction Entry option, and then click OK.

↑ Back to the top


Keywords: kbmbspartner, kbmbsmigrate, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 2580792
Revision : 1
Created on : 1/7/2017
Published on : 7/20/2011
Exists online : False
Views : 93