Hello,

How do i get this code to display my image using a database this is my code.

code Code:
  1. Private Sub Details()
  2.         Dim oleDBC As New OleDbCommand
  3.         Dim OLEDBDR As OleDbDataReader
  4.         con.Open()
  5.         With oleDBC
  6.             .Connection = con
  7.             .CommandText = "SELECT UserID,imagepath FROM Users"
  8.         End With
  9.         OLEDBDR = oleDBC.ExecuteReader
  10.         If OLEDBDR.HasRows Then
  11.  
  12.             While OLEDBDR.Read
  13.                 lblName.Text = (OLEDBDR.Item(0))
  14.                 PictureBox1.Image = (OLEDBDR.Item(1))
  15.             End While
  16.  
  17.  
  18.            
  19.             con.Close()
  20.         End If
  21.     End Sub

I get an error saying

Unable to cast object of type 'System.String' to type 'System.Drawing.Image'.

but if i use lblName.Text = (OLEDBDR.Item(1)) it will display the path to the image.?