String data, right truncation


  • Hi,

    I am trying to execute one huge select statement from my application using ODBC, but I am getting this error:

    [Microsoft][ODBC SQL Server Driver]String data, right truncation.

    the select statement is bigger than 2000 characters, but I don't have any long string column, just strings and numbers. How can I work around this?

    Is there any max size? Because if I use less than 1000 characters, it works fine.

    I am using Centura/SqlWindows, Native Sql Server ODBC and SqlServer 2005. unfortunately, I can not use Ole from my application.


    Alessandro Camargo

    Tuesday, October 17, 2006 11:07 PM

All replies

  • This error can happen due to incorrect values for other data types also. So check the SQLBindParameter calls and verify the parameters.
    • Proposed as answer by boflynn Tuesday, June 04, 2013 4:51 PM
    Tuesday, October 17, 2006 11:25 PM
  • Hi,

    I checked all values, they are all correct, so I think could be another problem, but I don't have any idea.


    Alessandro Camargo

    Tuesday, October 17, 2006 11:55 PM