FIX: Fixed Length Dates Cause Syntax Errors in srv_convert() |
Q132498
The information in this article applies to:
- Microsoft SQL Server versions 4.2x, 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 query words: convert
Keywords :
Issue type : kbbug
Technology : kbSQLServSearch kbAudDeveloper kbSQLServ600 kbSQLServ420OS2
Last Reviewed: March 25, 2000 |