BUG: ESQL: Insert w/ Single and Double Quotes May Cause Error

Last reviewed: April 29, 1997
Article ID: Q112987

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.


Additional query words: Tran
Keywords : kbbug4.21 kbprg SSrvCobol SSrvProg
Version : 4.21 | 4.21
Platform : MS-DOS OS/2


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.