This insert code is showing this error below. i don't know what the problem is i have checked my database and it still not from there.
String or binary data would be truncated. The statement has been terminated.
using (SqlConnection con = new SqlConnection())
{
con.ConnectionString = str;
using (SqlCommand cmd = new SqlCommand())
{
cmd.CommandType = CommandType.Text;
cmd.Connection = con;
cmd.CommandText = "INSERT INTO CustomerAccount (Account_Type,Account_Officer,Verified_By,Payment_Type,Charges) VALUES(@Account_Type,@Account_Officer,@Verified_By,@Payment_Type,@Charges)";
// cmd.Parameters.AddWithValue("@Processed_By", ddlp);
cmd.Parameters.AddWithValue("@Account_Type", ddlaccountype.SelectedItem.Text.Trim());
cmd.Parameters.AddWithValue("@Verified_By", txtverifiedby.Text.Trim());
cmd.Parameters.AddWithValue("@Charges", txtcharges.Text.Trim());
cmd.Parameters.AddWithValue("@Payment_Type", ddlpaymentype.SelectedItem.Text);
cmd.Parameters.AddWithValue("@Account_Officer", txtaccountofficer.Text.Trim());
// cmd.Parameters.AddWithValue("@Balance", totam);
con.Open();
inserted = cmd.ExecuteNonQuery();
// txtphone.Text = sdr["Phone"].ToString();
con.Close();
//BindGridreport();
}
}