database setting - ODBC issue

  • user gets the error below when running from the application

    "[8152] [1] [0] "[Microsoft][SQL Native Client][SQL Server]String or binary data would be truncated"

    it is just an update statement.It works fine when running from the management studio.i did find some articles on this error but those were in reference to the errors from management studio..recently this db was migrated from 2000. On other environments works fine..I am confused whether it is sql issue or app server issue. Please suggest me..thanks

  • Hi,

    please check the length of the string you are passing to the database.

    If you have a table with a VARCHAR(10) field and pass the string '1234567891011' you get this error message.

    Regards.

  • it is just updating with "0: as the data...it works fine from query analyzer..the error is only seen from doing from the application..thanks.

  • Profile the statements(using profiler) executed by the application when it runs the update code and see what all gets executed apart from this(any other statement due to presence of triggers).

    MJ

  • user did try running the application by disabling the triggers...same error...my colleague ran the trace before said he cdnt find any helpfull information..ill try once again..thanks...

  • made some changes..tables permissions were missing..lets see if that fixes the issue..will update..thanks

  • no luck..still same issue...any suggestions?

  • Hi I have this error before - please check quat in your application update statement like "Update [tbl] SET [FLD]='test text'"

  • thanks for your reply..what do u mean by "quat"...thanks,

  • Sorry it was typo - should be quote

    Thanks

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply