Skip to content

Handle varchar(max)/nvarchar(max) column sizes#1954

Merged
mhammond merged 1 commit intomhammond:mainfrom
EZForever:fix-odbc-1953
Oct 21, 2022
Merged

Handle varchar(max)/nvarchar(max) column sizes#1954
mhammond merged 1 commit intomhammond:mainfrom
EZForever:fix-odbc-1953

Conversation

@EZForever
Copy link
Copy Markdown
Contributor

SQLDescribeCol() returns 0 ("unlimited") as column sizes for varchar(max)/nvarchar(max)/varbinary(max) types. We use the cursor's maximum output size instead in this case.

The change for SQL_BINARY/SQL_VARBINARY cases is not a must but fits the idea of the original commit (c91a0f1).

Fixes #1953.

`SQLDescribeCol()` returns 0 ("unlimited") as column sizes for `varchar(max)`/`nvarchar(max)`/`varbinary(max)` types. We use the cursor's maximum output size instead in this case.

The change for `SQL_BINARY`/`SQL_VARBINARY` cases is not a must but fits the idea of the original commit (c91a0f1).

Fixes mhammond#1953.
Copy link
Copy Markdown
Owner

@mhammond mhammond left a comment

Choose a reason for hiding this comment

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

This makes sense, thanks.

@mhammond mhammond merged commit 6a41621 into mhammond:main Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

odbc - unable to fetch data from varchar(max) columns

2 participants