I want to retrieve pictures from a SQL Server table in my application written in C# with WPF. Right now I can get all the data, and also the picture file, but I can't see the picture.
I have this code to fetch the data:
The dataGrid is formed by 7 rows, and I want the last row to be the picture. How can I do it?
SqlConnection SqlConn = new SqlConnection();
SqlConn.ConnectionString = Conexion.Cn;
SqlConn.Open();
string CommandText = "SELECT * FROM datos_personales WHERE [nombre]= @texto_buscar";
SqlCommand SqlCmd = new SqlCommand(CommandText, SqlConn);
SqlCmd.Parameters.AddWithValue("@texto_buscar", this.TextFirstName.Text);
SqlDataAdapter adapter = new SqlDataAdapter(SqlCmd);
DataTable dt = new DataTable("datos_personales");
adapter.Fill(dt);
dataListado.ItemsSource = dt.DefaultView;
SqlConn.Close();
this.TextFirstName.Text = string.Empty;