FIX: NUMERIC Data Returned as FLOAT by RPC Call
Last reviewed: February 1, 1999 |
The information in this article applies to:
BUG #: 18157 (6.5)
SYMPTOMSWhen executing a stored procedure that returns NUMERIC or DECIMAL data on a remote server by means of server to server remote procedure call (RPC), those data types will be returned with a type of FLOAT. This may result in loss of precision for high numeric values. The following example demonstrates the effects of this problem:
On Server1, create the following stored procedure:
CREATE PROCEDURE numproc AS select 1234567890123456789.0
Calling "EXEC numproc" on Server1 returns the expected result:
1234567890123456789.0
However, calling the stored procedure from a remote server, by using a
statement such as "EXEC Server1...numproc" returns the following:
1.234567890123456e+018
CAUSEA server doing an RPC call logs in to the remote server as a SQL Server 4.2 client (because a remote server could also be a SQL Server 4.2 server, which would not understand SQL Server 6.0 or 6.5 login packets). However, a SQL Server 6.0 or 6.5 server returns NUMERIC data as FLOAT to SQL Server 4.2 clients because the NUMERIC data type was not available with SQL Server 4.2.
WORKAROUNDTo work around this problem, convert NUMERIC data to VARCHAR when returned by a stored procedure that might also be called remotely.
STATUSMicrosoft has confirmed this to be a problem in SQL Server versions 6.0 and 6.5. For SQL Server 6.5, this problem has been corrected in the latest U.S. Service Pack for SQL Server version 6.5. For more information, contact your primary support provider.
|
Additional query words: datatype datatypes SP sp5 st proc sproc |
Last reviewed: February 1, 1999
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.