Article ID: 182386
Article Last Modified on 10/24/2003
AFX_SQL_SYNC(::SQLBindParameter(pFX->m_hstmt, (UWORD)nField,
(SWORD)pFX->m_nFieldType, SQL_C_CHAR, (SWORD)nColumnType,
nMaxLength, nScale, pvParam, 0, plLength));
The problem is the next to the last parameter, the cbValueMax argument,
which is hard coded to 0 (zero). The cbValueMax argument specifies the
length of the buffer; it applies only to character data, not to numerics.
If the number of bytes available to return is greater than or equal to this
number, then the driver truncates it to cbValueMax-1 and null terminates it
(and throws the error above). Because the parameter is hard coded to 0, the
error will always be returned.
AFX_SQL_SYNC(::SQLBindParameter(pFX->m_hstmt, (UWORD)nField, (SWORD)pFX->m_nFieldType, SQL_C_CHAR, (SWORD)nColumnType, nMaxLength, nScale, pvParam, nMaxLength, plLength));By using the nMaxLength input parameter, the new RFX_Text function allows the driver to set up a buffer of the correct size for the text Output parameter.
Keywords: kbdatabase kbprb KB182386