You must Sign In to post a response.
  • Category: ASP.NET

    String or binary data would be truncated.

    i get dis error on form registration..it works locally fine but on server upload
    i encounter dis error

    String or binary data would be truncated.
    The statement has been terminated.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: String or binary data would be truncated.
    The statement has been terminated.

    Source Error:


    Line 170: SqlCommand cmd = new SqlCommand(sqlstr, con);
    Line 171: con.Open();
    Line 172: cmd.ExecuteNonQuery();
    Line 173: con.Close();
    Line 174:
  • #769825
    I think you need to check the column length and the data that you are trying to fit into it.
    We usually get the same error in SSIS as well when data length is more than the column length.


  • Sign In to post your comments