Skip to content
This repository was archived by the owner on Jun 7, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions win-odbc64/odbcclient/drvr35/cdiag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,15 +378,15 @@ SQLRETURN CDiagRec::GetDiagRec(SQLSMALLINT RecNumber,

//Double strLen to circumvent the bug in driver manager, that requires us to give
//the NO. OF BYTES instead of no. of characters
strLen = tmpStrLen * 2;
strLen = tmpStrLen;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the comment before this statement be deleted?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it seems the bug mentioned is fixed and I will verify it.


translateLengthMax = (BufferLength == SQL_NTS) ? strLen : BufferLength;

if (MessageText != NULL)
{
// translate from UTF8 to WChar
if ( (rc = UTF8ToWChar((char *)MsgStruct.lpsMsgText.c_str(), tmpStrLen, MessageText,
translateLengthMax/2, (int *)&translateLength, (char *)errorMsg)) != SQL_SUCCESS )
translateLengthMax, (int *)&translateLength, (char *)errorMsg)) != SQL_SUCCESS )
rc = SQL_SUCCESS_WITH_INFO; //ERROR;

((wchar_t *)MessageText)[translateLength] = L'\0';
Expand Down