How to retrieve photo from Ms Access database? VB.Net code

It is very easy I have tried by creating a function and calling that function at the place ,where it is needed. Just for example  prepare a windows form and create a database in Ms Access as I have described in my previous post. and follow all the step as mentioned in that post.In code editor just create a function

Step -1
on top of the code editor import following
Imports System.Data.OleDb
Imports System.Drawing
Imports System.Drawing.Imaging
Imports System.IO

Create a function

Private Sub ShowDetails()
         Dim sEmpID As String
        sEmpID = ("Enter sno")
        If sEmpID.Trim = "" Then
            Exit Sub
        End If
            Dim cn As New OleDb.OleDbConnection
            Dim cmd As OleDb.OleDbCommand
            Dim dr As OleDb.OleDbDataReader
            cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Ram Ayodhya Singh\My Documents\Picture.mdb"
            cmd = cn.CreateCommand()
            cmd.CommandText = "select * from picroll where sno = '" & sEmpID & "'"
            dr = cmd.ExecuteReader
            If dr.Read Then
                Dim bytImage() As Byte
                    bytImage = CType(dr(2), Byte())
                     Dim ms As New System.IO.MemoryStream(bytImage)
                     Dim bmImage As New Bitmap(ms)
                     PbNewImage.Image = bmImage
                 Catch ex As Exception
                End Try
             End If
         Catch ex As Exception


        End Try
end sub
step -2 then place a button on your windows form name it "BtnShow"and text property "Show". and on the click event  call this function in addition to other information you want to show. In my code I have show the photo of an individual along with in unique identification number and name.

Private Sub BtnShow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnShow.Click
        If txtSNo.Text = "" Then
            MsgBox("Please enter sno")
        End If
             Dim sEmpID As String
            sEmpID = txtSNo.Text
            Dim CmdER As New OleDbCommand
            Dim MyReader As OleDb.OleDbDataReader
            Dim BitmapFromDB As Bitmap = Nothing
            CmdER.Connection = cn
            CmdER.CommandText = "select * from picroll where sno = '" & sEmpID & "'"
            MyReader = CmdER.ExecuteReader
            If MyReader.Read() Then
                txtSNo.Text = MyReader("sno")
                TxtName.Text = MyReader("Ename")
                ShowDetails()(Here it is show the phot of the indidvidual)
                MsgBox("This s.no is not a member of this database")
                txtSNo.Text = (" ")
            End If
        Catch ex As Exception
            Dim MessageString As String = "Report this error to the system
            MessageBox.Show(MessageString, TitleString, MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try

    End Sub
To understand Vb.Net in better way I will suggest you to have  book written by Anne Prince  "Murach Visual Basic" and that is available on  Amozon and Flipkart
  Hope this will solve your problem. For More Such code refere above mentioned book