Trying to get Image from Access OLE Object into PictureBox in VB code
I am programming with Access 2007
VB.net in Visual Studio 2010
I am trying to have my VB program read the database, extract the .bmp image, and assign it to a PictureBox on the fly (I am actually creating a Group on the fly and filling it with data from the database that are selected by my query. One of the fields is "image". All of my other fields are successfully transferring from the DB to the group box.) My problem is converting the OLE Object to a picture/image that I can assign to the PictureBox.
I am using TableAdapters and queries set up in an .xsd.
I have a database with an OLE Object field.
Here is a code snipit of my database set up:
Dim ta AsNew dsWhiteboardTableAdapters.MonstersTableAdapter
Dim monsterList AsNewdsWhiteboard.MonstersDataTable
Dim monster AsdsWhiteboard.MonstersRow
Dim newMonster AsGroupBox
Dim cnt AsInteger = monsterList.Rows.Count
If cnt > 0 Then
For r AsInteger = 0 To cnt - 1
monster = CType(monsterList.Rows(r), dsWhiteboard.MonstersRow)
newMonster = NewGroupBox