I am attempting to retrieve an image stored as a BLOB in a SQLite database and display that image in a Windows Form PictureBox control.
By inspecting my program in debug, I have concluded that I can retrieve the correct BLOB and store it in a System::Object ^ (which is the return type of the ExecuteScalar() method). However, I have no idea what to do with this System::Object; even though it contains the right data, I cannot convert it to anything useful, like a char array or System::Drawing::Image.
This is what I have so far:
System::Object ^ obj = cmd->ExecuteScalar();
What can I do with obj to get my image on a Windows Form? Just trying to cast it as a char array or image is resulting in casting errors.