The error implies that you are attempting to insert a value which is to big for the column length within the database. Please look through your database schema and identify which column is causing the issue.
Looking at the snippet of code I have a few other observations which maybe of some help.
Does the Update statement require a where clause?
Do use parameterised queries as this will help against SQL injection attacks.
Using statement are very helpful in clearing and cleaning up an objects, in this case a using statement help managing the open connections to the database.
If you wish to check for valid string lengths before sending them to the database check the arguments before creating connections etc. ideally these check would be carried out in your business logic layer.
if (activeEvaluate.Length > 5)
{
throw new ArgumentException("activeEvaluate");
}
using (SqlConnection connection = new SqlConnection(ConnString))
{
using (SqlCommand cmd = connection.CreateCommand())
{
cmd.CommandText = "UPDATE savedinfo set User_id= @UserId, Date = @Date, Evaluate = @Evaluate, TimeStart = @TimeStart, TimeEnd = @TimeEnd, Salary = @Salary ";
cmd.Parameters.AddWithValue("@UserId", Login.GetUserID());
cmd.Parameters.AddWithValue("@Date", DateTime.Now.ToLongDateString());
cmd.Parameters.AddWithValue("@Evaluate", activeEvaluate.ToString());
cmd.Parameters.AddWithValue("@TimeStart", dtCurrentTime1.ToLongTimeString());
cmd.Parameters.AddWithValue("@TimeEnd", dtCurrentTime2.ToLongTimeString());
cmd.Parameters.AddWithValue("@Salary", todaySalary.Text);
cmd.Connection.Open();
cmd.ExecuteNonQuery();
}
}