我应该如何显示 longblob 格式?
我想用 c# 在 MYSQL 中检索“内容”longblob 格式。
string MyConnectionString = "Server=localhost;Database=newsborad;Uid=root;Pwd=root;";
//this is the connection with the MYSQL
MySqlConnection conn = new MySqlConnection(MyConnectionString); //communicate MYSQL
MySqlCommand cmd = conn.CreateCommand();
conn.Open();
//content is longblob format in MYSQL
cmd.CommandText = "Select content from message where msg_id = @id";
cmd.Parameters.AddWithValue("@id", "1");
while (reader.Read())
{
//how i should code?
}
conn.Close();