-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Poco:Data::ODBC - MSSQL (n)varchar(max) length issue #4324
Comments
From SQLBindParameter:
The poco/Data/ODBC/src/SessionImpl.cpp Lines 134 to 138 in e868ecb
and send pull request. |
See also DataFormat:
|
…#4738) * fix(ODBC): Poco:Data::ODBC - MSSQL (n)varchar(max) length issue #4324 * chore(ODBC): remove unused vars; fix SQL Server SDK include path #4324 * fix(ODBC): trim UTF16 string #4324 * chore(ODBC): add compile time big string diagnostics #4324 * chore(ODBC): add SQLServer big string vector test case #4324 * fix(ODBC): detect SQLServer header #4324 * chore: add listing msodbdcsql18 folder #4324 * ci: change odbc drivers installation order #4324 * chore(CMake): Add option ENABLE_DATA_SQL_SERVER_BIG_STRINGS, auto-detection of msodbcsql.h on Linux and macOS * fix(ODBC): detect backend at runtime for string size; add Session::dbmsName() #4324 * fix(ODBC): wrong char to string conversion #4324 --------- Co-authored-by: cunj123 <n.belusic@pta.hr> Co-authored-by: Matej Kenda <matejken@gmail.com>
Describe the bug
The data binding of (n)varchar(max) field in Poco:Data::ODBC seems just to allow max 8000 bytes, but MSSQL Server allow allows up to 2^31-1 bytes.
To Reproduce
Create a table with a varchar(max) or nvarchar(max) field, insert data with more then 8000 byte.
Expected behavior
I should be possible to insert data with more then 8000 bytes when SQL datatype is (n)varchar(max).
Logs
INSERT failed: exception: 'class Poco::Data::LengthExceededException' what: 'Data too long' message: 'Error binding column 6 size=67150, max size=8000)'
Please add relevant environment information:
Additional context
I think the retrieving of the type info of the DB needs a special handling for (n)varchar(max).
The text was updated successfully, but these errors were encountered: