Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODBC function SQLGetInfo fails if SQL_KEYWORDS InfoType is requested. [ODBC190] #177

Closed
firebird-automations opened this issue Jul 10, 2015 · 5 comments

Comments

@firebird-automations
Copy link

Submitted by: @paulbeach

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;

Commits: 64b1ce1 4ff3322

@firebird-automations
Copy link
Author

Modified by: @paulbeach

Version: 2.0.3 [ 10581 ]

description: ODBC function SQLGetInfo fails if SQL_KEYWORDS InfoType is requested.

environment: Linux x86-64

@firebird-automations
Copy link
Author

Modified by: @paulbeach

description: ODBC function SQLGetInfo fails if SQL_KEYWORDS InfoType is requested. => 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;

@firebird-automations
Copy link
Author

Commented by: @alexpotapchenko

Fixed in CVS for B_2_0_0 and head with the same fix in SQLSetDescFieldW

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.0.4 [ 10662 ]

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants