Hello all Experts,
I have following Code to get Image from dataBase and Show it in the Gridview Control on my web page but I am succeded to get data but when I bound the DataSet with GridView it doesnot show me Image.
You can View error on Attached Image.
Can any one Solve my problem.
Thanks in Advance.
Public Cmd As New SqlClient.SqlCommand
Public SQLCon As New SqlClient.SqlConnection(Con)
Public ds As New DataSet
Public myAdapter As New SqlDataAdapter
Public MyActiveFormName As String
Public Qry As String
Public EmptyTable As Boolean
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Sql_Procedures.Fill_DataSetWithOutArg("Sel_MovMaster", "Tbl_SelMovMaster4MainPage")
dg_Main4Master.DataSource = Sql_Procedures.ds.Tables("Tbl_SelMovMaster4MainPage")
dg_Main4Master.DataBind()
End Sub
Public Sub Fill_DataSetWithOutArg(ByVal SPName As String, ByVal TableName As String)
Try
myAdapter = New SqlDataAdapter(SPName, SQLCon)
myAdapter.Fill(ds, TableName)
ds.Tables(TableName).Clear()
myAdapter.Fill(ds, TableName)
If ds.Tables(TableName).Rows.Count = 0 Then
EmptyTable = True
Else
EmptyTable = False
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub