我应该如何显示长blob格式?
我想用c#检索MYSQL中的“content”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();