FIX: ODS Function Srv_describe May Fail on Certain Type Conversions

ID: Q246607


The information in this article applies to:
  • Microsoft SQL Server version 7.0

BUG #: 55909 (SQLBUG_70)

SYMPTOMS

The Open Data Services (ODS) function srv_describe must be used in an ODS application or an extended stored procedure to set the characteristics (name and data type) of a column of the result set returned to the client. The function also defines the data type of the data source. If the source and target data types differ, an implicit data conversion takes place when sending a row of the result set by calling srv_sendrow.

However, srv_describe incorrectly returns FAIL if the source data type is not a fixed length data type and the length of the source data field is greater than the maximum length of the target data type.

For example, the following call to srv_describe will return FAIL:


   srv_describe (srvproc, 1, "Col", -1, SRVINT4, 0, SRVCHAR, 5, "12345") 
Whereas the following call succeeds because the source data length matches the maximum length of the target type SRVINT4, which is 4:

   srv_describe (srvproc, 1, "Col", -1, SRVINT4, 0, SRVCHAR, 4, "1234") 


RESOLUTION

A supported fix that corrects this problem is now available from Microsoft, but it has not been fully regression tested and should be applied only to systems experiencing this specific problem. If you are not severely affected by this specific problem, Microsoft recommends that you wait for the next SQL Server service pack that contains this fix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information on support costs, please go to the following address on the World Wide Web:

http://www.microsoft.com/support/supportnet/overview/overview.asp
The English version of this fix should have the following file attributes or later:

   Version      File name      Platform
   --------------------------------------------

   7.00.750     Opends60.dll   Intel and Alpha 
NOTE: Due to file dependencies, the most recent hotfix or feature that contains the above files may also contain additional files.


WORKAROUND

To work around this problem, use identical source and target data types in srv_describe and where necessary perform an explicit data conversion using srv_convert before each call to srv_sendrow.


STATUS

Microsoft has confirmed this to be a problem in SQL Server version 7.0.

Additional query words: xp xps xproc xprocs datatype datatypes

Keywords : SSrvODS kbbug7.00 kbSQLServ700bug
Version : winnt:7.0
Platform : winnt
Issue type : kbbug


Last Reviewed: November 20, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.