My sql procedure is:
- ALTER proc [dbo].[sp_Load_GridView]
- AS
- BEGIN
- SET NOCOUNT ON;
- SELECT Employee_ID,Employee_Name, Emp_Photo FROM Employee_Information
- END
but image not showing in grid,
Here is my code:
- SqlCommand cmd = new SqlCommand("sp_Load_GridView", con);
- cmd.CommandType = CommandType.StoredProcedure;
- SqlDataAdapter sda = new SqlDataAdapter(cmd);
- DataTable dt = new DataTable();
- try
- {
- sda.Fill(dt);
- dataGridView1.DataSource = dt;
- }
- catch (SqlException ex)
- {
- MessageBox.Show(ex.Message)
- }
- finally
- {
- con.Close();
- con.Dispose();
- }