Microsoft KB Archive/813524

= FIX: OLE DB conversion errors may occur after you select a literal string that represents datetime data as a column =

Article ID: 813524

Article Last Modified on 11/2/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Developer Edition
 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 2000 Enterprise Edition
 * Microsoft SQL Server 2000 Personal Edition
 * Microsoft SQL Server 2000 Enterprise Edition
 * Microsoft SQL Server 2000 Workgroup Edition
 * Microsoft SQL Server 2000 Desktop Engine (Windows)
 * Microsoft SQL Server 2000 Developer Edition
 * Microsoft SQL Server 2000 Enterprise Edition 64-bit

-





SYMPTOMS
You apply Microsoft SQL Server 2000 Service Pack 3 (SP3), and then select a literal string that represents datetime data as a column in a query that accesses a SQL Server 2000 linked server. After you do so, you receive the following error message:

Server: Msg 7341, Level 16, State 2, Line 1

Could not get the current row value of column '(user generated expression).Expr1002' from the OLE DB provider 'SQLOLEDB'. Could not convert the data value due to reasons other than sign mismatch or overflow.

[OLE/DB provider returned message: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.]

OLE DB error trace [OLE/DB Provider 'SQLOLEDB' IRowset::GetData returned 0x80040e21: Data status returned from the provider: [COLUMN_NAME=Expr1002 STATUS=DBSTATUS_E_CANTCONVERTVALUE]].



CAUSE
SQL Server 2000 Service Pack 3 introduces a change that affects the remoting for the string representation of datetime data. The multilanguage DATES_ISO8601standard is used in SQL Server 2000 SP3 to avoid potential incorrect datetime conversions between a local instance of SQL Server 2000 and a SQL Server 2000 linked server in a different language. However, the DATES_ISO8601standard is not supported by OLE DB, and you experience the problem that is described in this article.



WORKAROUND
To work around this problem, use a datetime variable. The following code is an example of how you can work around this problem: DECLARE @v datetime set @v = convert(datetime, '2003-01-01 12:00:00') SELECT @v FROM [linked_server_name].[pubs].[dbo].[authors]



Service pack information
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 How to obtain the latest SQL Server 2000 service pack

Hotfix information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel. Date         Time    Version          Size        File name --- 02-Apr-2003  18:42   2000.80.794.0    7,540,820   Sqlservr.exe Note Because of file dependencies, the most recent hotfix or feature that contains these files may also contain additional files.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.This problem was first corrected in Microsoft SQL Server 2000 Service Pack 4.



MORE INFORMATION
To reproduce this problem, use the following sample query: SELECT CONVERT(datetime, '2003-01-01 12:00:00') FROM [linked_server_name].[pubs].[dbo].[authors]

Keywords: kbbug kbfix kbqfe kbsqlserv2000presp4fix kbhotfixserver KB813524

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.