BUG: SELECT w/ UNION ALL of Two Views Causes GPF in Sqlsrv32.dll

Last reviewed: November 3, 1997
Article ID: Q175905
The information in this article applies to:
  • Microsoft SQL Server, versions 6.5
  • Microsoft Open Database Connectivity, versions 2.5 and 3.0
BUG #: 17296 (6.5)

SYMPTOMS

When you perform a SELECT query with a UNION ALL of two views, a general protection (GP) fault occurs in Sqlsrv32.dll. The views are generated with SELECT statements that contain embedded CONVERT functions. The GP fault occurs on a call to SQLExtendedFetch when fetching the results using a server cursor.

CAUSE

The GP fault occurs because metadata about a column maximum width that is returned to the driver from the server cursor is incorrect.

WORKAROUND

To work around this problem, use the RTRIM string function to remove the extra padding after you use the CONVERT function. The CONVERT function incorrectly sets the resulting column width at 255 characters when it converts from the integer datatype to the character datatype. Use permanent or temporary tables, instead of views, to store the resulting data.

STATUS

Microsoft has confirmed this to be a problem in Microsoft SQL Server version 6.5 and ODBC versions 2.5 and 3.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: GPF
Keywords : kbbug6.50 SSrvGPF SSrvProg kbusage
Version : Windows:2.5,3.0,6.5
Platform : WINDOWS
Issue type : kbbug
Solution Type : kbworkaround


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: November 3, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.