BUG: DB-Library bcp_sendrow() Fails on SQL 7.0ID: Q236003
|
The DB-Library bcp function bcp_sendrow() fails with the following error message:
"NNN" in the preceding example is 1 more than the actual number of columns in the table. This error is seen for every row. The same DB-Library application worked fine with Microsoft SQL Server 6.5 or 6.0.#@ Row 1, Column NNN: The row length exceeds SQL Server's maximum allowable size. @#
The cause of this problem is a change in the way that SQL Server 7.0 stores NULLable columns when compared to earlier versions of SQL Server.
One workaround is to change the data type for any nullable CHAR columns in this table to VARCHAR, and change any nullable BINARY columns to VARBINARY. The change causes the minimum row length to be calculated similarly to 6.5 for these columns.
You should also consider converting the process to use the ODBC or OLEDB APIs, which provide functionality that is superior to the feature set exposed by DB-Library. DB-Library has not been enhanced to take advantage of new SQL 7.0 functionality such as Unicode data types, long rows, 8000 byte CHAR/VARCHAR columns, and so forth.
Microsoft has confirmed this to be a problem in SQL Server version 7.0.
Q174817 INF: Microsoft SQL Server DB-Library Has Limited Extensibility
Additional query words: dblib db-lib dblibrary db-library bcpsendrow bcp_sendrow function fcn
Keywords : SSrvBCP SSrvDB_Lib kbbug7.00 kbSQLServ700bug
Version : winnt:7.0
Platform : winnt
Issue type : kbbug
Last Reviewed: August 12, 1999