BUG: ESQL: SQLD Is Set Incorrectly with Some Prepared Queries

Last reviewed: May 5, 1997
Article ID: Q105324
The information in this article applies to:
  • Microsoft Embedded SQL version 4.21 for COBOL
BUG# 9292 (4.21)

SYMPTOMS

The PREPARE statement may incorrectly set SQLD to zero if the prepared statement is a SELECT query with ORDER BY, or UNIONed with another SELECT query.

In the case of ORDER BY, the problem will occur if the ORDER BY is on a column that does not have any clustered indexes. For example:

   select * from authors order by au_lname

will cause this problem, but

   select * from authors order by au_id

will not. There is a clustered index defined on au_id, but not on au_lname.

In case of UNION, any two SELECT statements that are UNIONed together will have SQLD set incorrectly.

This SQLD is supposed to be set to the number of columns the prepared SELECT query returns, and to zero if the prepared query does not return any results.

CAUSE

SQL Server Embedded SQL for COBOL incorrectly set the SQLD value if the prepared statement contains ORDER BY on a column without a clustered index, or if UNION is used in the query.

STATUS

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


Additional query words:
Keywords : kbbug4.20a kbbug4.21 kbprg
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: May 5, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.