I have a nvarchar(50) field in my table. When I save a string with 12 character Length for example, it saves the string with 50 character length. Actually it adds a space character at the end of the string. Should I select another data type?
tmp_Person.NameFamily = txt_NameFamily.Text.Trim();
PersonKBBSHDataContext.PersonInfos.InsertOnSubmit(tmp_Person);
PersonKBBSHDataContext.SubmitChanges();
When I save a string directly (in SQL Server) in the NameFamily field of the table, everything is fine.
I found the problem. I just added my table again in the
.dbmlfile and everything went fine.