可参考如下代码:
string sql="insert into TableName (FieldName) values(N'"+ richtextbox.Text.Replace("'","''") +"')"
System.Data.SqlClient.SqlConnection cnn = new System.Data.SqlClient.SqlConnection(connectionString);
cnn.Open();
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand(sql, cnn);
cmd.ExecuteNonQuery();
cnn.Close();