MSSQL: String data, right truncation, ODBC SqlState: 22001
Brought to you by:
edwardbenson
Writing a SQL_LONGVARBINARY field with a parameter that is longer than 255 bytes you get this error.
See also:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbccolumn_size.asp
Here's how we fixed this:
In DbxOpenOdbc.pas:
Beginning line 12143 insert following code:
// fix of a "Gupta" fix that does not work with MSSQL
fOdbcParamCbColDef := Length;
Logged In: YES
user_id=1463595
Originator: YES
Correction:
The following lines have to be inserted at line 12143
if( fOdbcParamSqlType = SQL_LONGVARBINARY ) then
fOdbcParamCbColDef := Length;
Logged In: YES
user_id=644745
Originator: NO
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbccolumn_size.asp
location not found
>Beginning line 12143 insert following code
Indicate more exactly in what place of the code were a change (bring more code).