Sub readQuestionData
Dim imgFile As RandomAccessFile
Dim buffer() As Byte
Dim i As Int
cursorQuestion = sqlQuestion.ExecQuery("SELECT * FROM question")
For i = 0 To cursorQuestion.RowCount - 1
cursorQuestion.Position = i
buffer = cursorQuestion.GetBlob("QUESTION")
imgFile.Initialize3(buffer, True)
imgFile.WriteObject(QuestionList, True, imgFile.CurrentPosition)
Next
cursorQuestion.Close
Dim imgIS As InputStream
Dim imgBuffer() As Byte
imgBuffer = imgFile.ReadObject(0)
imgIS.InitializeFromBytesArray(imgBuffer, 0, imgBuffer.Length)
Dim imgQuestion As Bitmap
imgQuestion.Initialize2(imgIS)
imgIS.Close
Activity.SetBackgroundImage(imgQuestion)
End Sub