Microsoft KB Archive/140534

= FIX: "Data Truncated Column" Erroneously Reported =

Article ID: 140534

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft Foundation Class Library 4.2, when used with:
 * Microsoft Visual C++ 6.1

-



This article was previously published under Q140534



SYMPTOMS
Each time the application moves to a another record, you receive the following ODBC error message:

Warning: ODBC Success With Info, Data truncated column.

State:01004,Native:0,Origin:[Microsoft][ODBC Single-Tier Driver]

where  represents the column number.



CAUSE
The error message occurs when you use CLongBinary field variables with database tracing enabled. Database tracing is enabled by running Tracer.exe and selecting the DB Tracing check box.

In the RFX_LongBinary function, the following code returns the SQL_SUCCESS_INFO warning: case CFieldExchange::Fixup: // Give empty buffer to find size of entire LongBinary AFX_SQL_ASYNC(pFX->m_prs, ::SQLGetData(pFX->m_prs->m_hstmt, (unsigned short int)nField, SQL_C_DEFAULT, &w, 0, plLength)); The RFX routine determines the size of the binary field by calling the SQLGetData function with a zero-length buffer. The variable plLength provides the length of the binary field after the call. Because a zero-length buffer is passed to SQLGetData, ODBC returns a warning indicating that there may be a problem.



RESOLUTION
Ignore the warning.



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

This problem is fixed in Visual C++ 4.0, and no reports were made for Visual C++ 2.x.

NOTE: Visual C++ 4.0 is a 32-bit product; therefore, the bug is not fixed in any version of 16-bit Visual C++.

Additional query words: 2.50 2.51 2.52

Keywords: kbbug kbdatabase kbfix kbvc400fix KB140534

-

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

© Microsoft Corporation. All rights reserved.