I'm having a problem with sql.
When I try updating like this:
UPDATE Event SET name = 'bla bla bla' WHERE id = 2
It gives me this error:
String or binary data would be truncated. The statement has been terminated.
However, when I try updating with one space less, like this:
UPDATE Event SET name = 'bla bla' WHERE id = 2
It works fine. How come? Any inputs on how to go around this error would be appreciated.
This has nothing to do with the space. The longer string is too long for
name
.Look at the definition of
name
. You'll see that'bla bla bla'
is too long for it. But'bla bla'
fits.