Rolando Ramirez's WebLog

A not-friendly error message that has survived many Sql Server versions

When you try to insert a string value wich has a greater length than a field supports, Sql Server (including the last version 2005) returns this unhelpful error message:

   "String or binary data would be truncated"

My problem with this error message is that the field with a problem is not specificied. It seems I'm not the only one complaining about this: Steve BryantLuciano also did.

Maybe somebody from the Sql Server team could tell us how hard could be to add this simple info to the error message or somebody has some workaround to find wich field is the problem, just remember that the're scenarios where you don't control the SQL sentence that is executed like BizTalk and its updategrams.

 

Comments

Job Alvarez said:

I am with you pal, SQL team should do something about unfriendly message, Any Sql server developer like us can spend hous and hours just to find which field(s) is causing the error.

Do you guy sknow if 2008 has solved this?

# May 13, 2008 5:06 PM

Simon said:

I've just had this message, but it only occors on one IE6 machine. Works on the same machine in firefox.

:/

# July 31, 2008 11:52 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)