FIX: Fixed Length Dates Cause Syntax Errors in srv_convert()

Last reviewed: December 19, 1997
Article ID: Q132498
4.21a 6.00 WINDOWS kbother kbbug4.21a kbbug6.00 kbfix4.21a.sp4

The information in this article applies to:

  • Microsoft SQL Server, versions 4.21a and 6.0

BUG# NT: 9658 (4.21a)

SYMPTOMS

Under some conditions, the Open Data Services (ODS) function srv_convert() can generate a syntax error in source field message, when the data being passed to srv_convert() is the correct format.

NOTE: This only happens on fixed length date conversions. For example, "19000101" (dates without dashes or slashes) versus "1900-01-01".

CAUSE

Fixeddate(), a function internal to Open Data Services, experiences a problem with an uninitialized work string that is then converted with atoi(). The first half of this value is user provided; the other half in the failing condition is invalid data left in the string, which should be initialized to 0. This can cause the date value calculated to be invalid and create a syntax error.

WORKAROUND

The only workaround for this problem is to parse the date values and insert dashes prior to conversion.

STATUS

Microsoft has confirmed this to be a problem in Open Data Services versions 4.21a and 6.0. This problem was corrected in the latest U.S. Service Pack for SQL Server version 4.21a. For information on obtaining the Service Pack, please contact your primary support provider.


Additional reference words: 4.21a 6.00 convert
KBCategory: kbother kbbug4.21a kbbug6.00 kbfix4.21a.sp4
KBSubcategory: SSrvODS SSrvWinNT


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