1. 你的数据库字段长度够吗?
2. 你的存储过程测试过吗?
3. 你调试了你传入参数的值是一长串还是一个字。
4. 你传入的值是否有特殊字符?

解决方案 »

  1.   

    SqlParameter parInput = mysqlComm.Parameters.Add("@ID", SqlDbType.Char); 
                parInput.Direction = ParameterDirection.Input; 
                parInput.Value = this.textBox2.Text.ToString();             parInput = mysqlComm.Parameters.Add("@Name", SqlDbType.Char); 
    你要指定长度
    SqlParameter parInput = mysqlComm.Parameters.Add("@ID", SqlDbType.Char,10); 
                parInput.Direction = ParameterDirection.Input; 
                parInput.Value = this.textBox2.Text.ToString();             parInput = mysqlComm.Parameters.Add("@Name", SqlDbType.Char,长度); 
    你不指定长度,参数自动给你截断了