将RichTextBox的内容直接写入数据库: private void button1_Click(object sender, EventArgs e) { System.IO.MemoryStream mstream = new System.IO.MemoryStream(); this.richTextBox1.SaveFile(mstream, RichTextBoxStreamType.RichText); //将流转换成数组 byte[] bWrite = mstream.ToArray(); //将数组写入数据库 System.Data.Sql