1

How i should display the longblob format?
I want to retreive "content" longblob format in MYSQL with c#.

    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();

0 Answers0