hi
i am geting an error on the below code
the follwoing error is
"Unable to cast object of type 'System.String' to type 'System.Byte[]'. "
theQuery.Connection.Open()
theDataAdapter.Fill(theDataSet)
theQuery.Connection.Close()
Dim theQuery As New OleDbCommand("SELECT Images FROM tblImages", New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\Images.mdb;"))Dim theDataSet As New DataSet()Dim theDataAdapter As New OleDbDataAdapter(theQuery)'MsgBox(theDataSet.Tables(0).Rows.Item(0).Item(0))
'get row
Dim theItem As Object = theDataSet.Tables(0).Rows(0).Item(0)
Dim correctObject() As Byte = CType(theItem, Byte()) 
If correctObject Is Nothing = False Then 'read into memstream
theMemStream.Write(correctObject, 0, correctObject.Length)
theMemStream.Position = 0
Using theMemStream As New MemoryStream()Me.PictureBox1.Image = Image.FromStream(theMemStream)End Using
End If
Work hard and become a leader; be lazy and never succeed. (Proverbs 12:24)