'String or binary data would be truncated' in Manegement Studio Express

I am getting this error:
Microsoft SQL Server Management Studio Express
No row was updated.

The data in row 158 was not committed.
Error Source: .Net SqlClient Data Provider.
Error Message: String or binary data would be truncated.

The statement has been terminated.

Correct the errors and retry or press ESC to cancel the change(s).
OK   Help  

When I try and edit any of the fields in a record. Even when I try and make a field shorter. It seems like this error is either wrong, or the database already has a value that is too long. As is stands now I can not edit any fields at all in the records that have this error. I have looked over every field and it looks like every field is large enough to hold all the data. I made all the fields that were close much larger and still no luck. This is really a problem. Any clues at all would be very much appreicated. Thanks in advance.

I'm using SQL server express 2005 and SQL Server Management Studio Express. Sorry I can't give more points, 195 is all I have.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi minermadison,

i have had this when attempting to edit fields that have a char data type in EM and management studio

the issue is that the char datatype pads the field with spaces so whenever you try modify it you go over the field size

a workround is when in the grid push F2 to edit the fiels then push the END key to go yo yhe end of the field then back space to remove all the paded spaces you should now be able to edit your field

minermadisonAuthor Commented:
I tried the workaround and it did not work for me. Most of the field typed are nvarchar(xx) where xx is PLENTY large. Should I change the datatype? What do you recomend?
minermadisonAuthor Commented:
OK, there was one field that was TEXT, when I upgraded to SQL Server from access, I read that TEXT was the field type to use for fields that were 'Memo' in access. But I just swtiched the datatype to nVarChar(Max) and now it works... Thanks anyway.

Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

>Should I change the datatype? What do you recomend?
i normally use the varchar datatype unless i need the unicode character set then i use nvarchar so i dont think you need to change

>Most of the field typed are nvarchar(xx) where xx is PLENTY large

strange i know imstateing the obvious but
are you changing multiple fields or one at a time?
do you get this when you delete all the contents of one field ?

minermadisonAuthor Commented:
I thought it would be better to allow unicode.

I was changing one field at a time. And when I tried delete the whole row I got the same error. The problem must have been the TEXT datatype, I mean I was not trying to update that field, but when I changed it to nVarChar(max) the error went away. I'm not sure exactly why this worked, but it worked so I'm happy for now. I'm trying to read more about SQL datatypes now.... Thanks for your help anyway....

Closed, 195 points refunded.
Special Ops Mod

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.