ODBC issue binding string column
I've upgraded from Poco 1.7.9 to 1.8.1. Now I'm facing an issue using the sybase SQL Anywhere 16 odbc driver on Windows. Binding of string columns is no longer possible.
Session sess( "ODBC", dsn );
std::vector<string> versions;
string guid = "someguid";
sess << "select szDBVersion from LXG_FIRMA where szGUID=?", use( guid ), into( versions ), now;
A "LengthExceededException" is being raised. This is due to a change in Binder::getColSizeAndPrecision. The first call to "_pTypeInfo->tryGetInfo(cDataType, "COLUMN_SIZE", tmp)" is returning "false", which causes the exception.
Am i doing something wrong or is this a bug in the latest poco version?
POCO version
1.8.1
Compiler and version
VS2015
Operating system and version
Win10
Thanks in advance, Marko
It is a fix for bug. doing this right is hard because different back ends have different ways of determining the length limit. fix has been tested with Oracle, SQLServer, MySQL and PostgreSQL, but not with sybase. So, if you can help provide the right algorithm there, the fix will be easier.
Thanks aleks-f for your response! Not sure if my knowledge is deep enough to provide a reliable patch for the problem. Will try it...
Kind regards, Marko
This issue is stale because it has been open for 365 days with no activity.
This issue was closed because it has been inactive for 60 days since being marked as stale.