I am running the following code to pull an image from my SQL Database. The image is a pointer to a file in a directory. I get the following exception "Conversion from type "DBNull" to type "String" is not valid. The highlighted line is where it throws the exception. Any help would greatly appreciated. Thanks.
Dim MyReader As OleDb.OleDbDataReader Dim MyCommand As New OleDb.OleDbCommand("SELECT Name, Image FROM dbo.Info") Dim MyConnection As New OleDb.OleDbConnection("Provider=SQLOLEDB;server=(local)\SQLExpress;Integrated Security=SSPI;database=dbOne")MyConnection.Open()
MyCommand.Connection = MyConnection
MyReader = MyCommand.ExecuteReader
MyReader.Read()
Me.PictureBox1.Image = Image.FromFile(MyReader("Image"))MyConnection.Close()

Getting an Exception! Any Help
Dave Sundell
beatriz_da