BUG: Bcp_bind Does Not Correctly Convert Real DBFLT4 (161351)



The information in this article applies to:

  • Microsoft SQL Server 6.0
  • Microsoft SQL Server 6.5
  • Microsoft SQL Server 2000 (all editions)

This article was previously published under Q161351
BUG #: 15685 (SQLBUG_60)
BUG #: 16378 (SQLBUG_65)
		

SYMPTOMS

In SQL Server 6.0 (release version) the error message "Error 10016: Requested data-conversion does not exist" was generated when you attempted a bcp_bind of DBFLT4 to a real or float column in the database.

This problem only occurred if the column in the database contained the NULLABLE attribute, and the bcp_bind specified zero (0) for the type parameter.

With SQL Server 6.0 Service Pack 3 and later, float, numeric, and decimal values are correctly added to the database. However, the real data type fails under the conditions described above.

The previous error message is no longer generated, but you now receive the following in the output error file:
#@ Row 1, Column 2: The row length exceeds SQL Server's maximum
allowable size. @# 1.0

CAUSE

Defaulting the program data type to the SQL Server data type results in comparing a DBFLT4 in the code to a NULLABLE data type, and the DB-Library conversion routines are not properly handling the conversion.

DB-Library fails to map and convert a DBFLT4 program variable to a nullable float value.

WORKAROUND

To work around this problem, specify SQLFLT4 for the bcp_bind type value.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Modification Type:MinorLast Reviewed:2/14/2005
Keywords:kbBug kbusage KB161351