Issue Details (XML | Word | Printable)

Key: ODBC-190
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Potapchenko
Reporter: Paul Beach
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ODBC Driver

ODBC function SQLGetInfo fails if SQL_KEYWORDS InfoType is requested.

Created: 10/Jul/15 09:53 AM   Updated: 06/Mar/16 05:35 PM
Component/s: None
Affects Version/s: 2.0.3
Fix Version/s: 2.0.4

Environment: Linux x86-64


 Description  « Hide
ODBC function SQLGetInfo fails if SQL_KEYWORDS InfoType is requested.

The following fix has been committed (file MainUnicode.cpp):

      ConvertingString( int length, SQLWCHAR *wcString, TypeRealLen *pLength = NULL, bool retCountOfBytes = true )
      {
              connection = NULL;
              realLength = pLength;
              returnCountOfBytes = retCountOfBytes;

              if ( wcString )
              {
                      isWhy = BYTESCHARS;
                      unicodeString = wcString;
                      if ( length == SQL_NTS )
                              lengthString = 0;
                      else if ( retCountOfBytes )
- lengthString = length / 2;
+ lengthString = length / sizeof(wchar_t);
                      else
                              lengthString = length;

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alexander Potapchenko added a comment - 14/Jul/15 08:48 AM
Fixed in CVS for B_2_0_0 and head with the same fix in SQLSetDescFieldW