Dim pSelectCommand As OleDbCommand = New OleDbCommand() Dim commandTextTemplate As String = "SELECT PICTURE FROM ALBUMS WHERE CODE= 4" pSelectCommand.CommandText = commandTextTemplate pSelectCommand.Connection = g_pOleDbConnection Dim fs As FileStream ' Open the connection and read data into the DataReader. If g_pOleDbConnection.State = ConnectionState.Closed Then g_pOleDbConnection.Open() Dim myReader As OleDbDataReader = pSelectCommand.ExecuteReader() 'Error is on this line Do While (myReader.Read()) Dim byteArray As Byte() = (myReader(g_pfldAPicture)) fs = New FileStream("Album.bmp", FileMode.CreateNew, FileAccess.Write) fs.Write(byteArray, 0, byteArray.Length) Loop
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)