C# WPF Show Image from Mysql

Posted by user3718026 on Stack Overflow See other posts from Stack Overflow or by user3718026
Published on 2014-06-08T15:07:14Z Indexed on 2014/06/08 15:25 UTC
Read the original article Hit count: 132

Filed under:
|
|
|

i'm a student and i am bad at programing. I saved the images in my mysql database for each player. I created a program where I can list some soccer players from my database. When i click on a listed player in datagrid, a new window appears with the information about the player. Everything works, but now i want a picture of the selected player to be displayed on the information window from the database. Can anybody help me? My english is not the best (i'm 17) so i hope you can understand what i mean.

This is what i tried to do but i don't know how to continue. PS. It's in WPF.

 MySqlCommand cmd = new MySqlCommand("SELECT Bilder FROM spieler WHERE Bilder='{8}'");
        MySqlDataReader rdr1 = cmd.ExecuteReader();

        try
        {
            conn.Open();
            while (rdr1.Read())
            {
                // image1... I don't know what to write here
            }

        }
        catch (Exception ex)
        {
            MessageBox.Show("Fehler: " + ex);
        }

        rdr1.Close()

© Stack Overflow or respective owner

Related posts about c#

Related posts about mysql