Microsoft KB Archive/112987

{|
 * width="100%"|

The information in this article applies to: - Microsoft Embedded SQL version 4.21 for COBOL BUG# 9763 (4.21)

SYMPTOMS
In an Embedded SQL for COBOL (ESQL/COBOL) application when a host variable is used to insert character values with embedded BOTH single AND double quotes, one of the following errors may occur, depending on whether the statement is dynamic or static:

Error 102: Syntax error near " " - or - Error 105: Unenclosed quotes before character string " "

CAUSE
SQL Server Embedded SQL for COBOL incorrectly handles the insertion of character strings that contain both single quotes and double quotes.

WORKAROUND
In case of both single and double quotes, ESQL/COBOL uses single quotes as the delimiters and takes two single quotes as one. Thus, the workaround in this case is to modify the character strings so that all single quotes are doubled but leave the double quotes intact.

STATUS
Microsoft has confirmed this to be a problem in SQL Server Embedded SQL for COBOL version 4.21. We are currently researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
 * }

-

Last reviewed: April 29, 1997

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.