I want to bind a SQL_C_CHAR to SQL_CHAR and get the Error "String Data,
Right Truncation" if the length of the data in one parameter is greater then
6 Bytes. The columnsize in the db-table is greater than 6. If all parameters
are 6 or lower everything works fine.
lendata=length of the STRING , pdata = pointer to the string
retcode=SQLBindParameter(cb->handleStatement, field,PARAM_INPUT,
SQL_C_CHAR, SQL_CHAR, lendata, 0,pdata,0 , &lendata);
I thought that something with codepages,language settings.. but if use the
option AutoTranslate with yes or no in the connection string nothing changes.
I am totally frustrated, I have no idea whats wrong?? Has somebody help.
http://dbaspot.com/forums/sqlserver-odbc/185618-sqlbindparameter-errors-invalid-precision-value.html
In this case the OP had set ColumnSize, but not BufferLength. If I read
your code correctly, it looks like BufferLength is 0. It should probably be
the same as the ColumnSize, namely lendata.
(Note: I am not an expert in this area.)
FWIW,
RLF
"chris" <ch...@discussions.microsoft.com> wrote in message
news:203E2DE2-2022-4ED0...@microsoft.com...
Have somebody else an idea?