Modified:
trunk/SDK/MYSQLPlus/Library/MStatement.cpp
Log:
Fixed SQLDescibeCol returning column name length in bytes rather than chars.
Modified: trunk/SDK/MYSQLPlus/Library/MStatement.cpp
===================================================================
--- trunk/SDK/MYSQLPlus/Library/MStatement.cpp 2006-11-05 22:43:07 UTC (rev 655)
+++ trunk/SDK/MYSQLPlus/Library/MStatement.cpp 2006-11-06 17:29:45 UTC (rev 656)
@@ -2609,7 +2609,7 @@
\param nColumn Column number. This is 1 based but 0 can be accessed
as it is the bookmark.
\param pszColumn Buffer to put IRD:SQL_DESC_NAME.
\param nBufferLength Buffer size in characters.
- \param pnNameLength Buffer to put the number of *bytes* in
IRD:SQL_DESC_NAME.
+ \param pnNameLength Buffer to put the number of chars in
IRD:SQL_DESC_NAME.
\param pnDataType Buffer to put IRD:SQL_DESC_CONCISE_TYPE (SQL data
type).
\param pnColumnSize Buffer to put column size. IRD derived but not mapped
to 1 field.
\param pnDecimalDigits Buffer to put number of decimal digits. IRD derived
but not mapped to 1 field. Will be 0 if N/A.
@@ -2739,7 +2739,7 @@
nReturn = getDiagnostic()->doAppend( MDiagnostic::STATE_01004 );
if ( pnNameLength )
- *pnNameLength = nCharsOut * sizeof(SQLWCHAR);
+ *pnNameLength = nCharsOut;
if ( pnDataType )
*pnDataType = pDescriptorRecord->getConciseType();