Private Sub insertDB
Dim q As String
Dim InputStream1 As InputStream
InputStream1 = File.OpenInput(File.DirAssets, "as.png")
Dim OutputStream1 As OutputStream
OutputStream1.InitializeToBytesArray(1000)
File.Copy2(InputStream1, OutputStream1)
Dim Buffer() As Byte = OutputStream1.ToBytesArray
Try
q="INSERT INTO test VALUES(?)"
SQL1.ExecNonQuery2(q, Array As Object(Buffer))
Catch
Log(LastException)
End Try
loadImg
End Sub
Private Sub loadImg
Dim RS As ResultSet = SQL1.ExecQuery("SELECT * FROM test")
RS.NextRow
Dim Buffer() As Byte = RS.GetBlob("myblob")
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Dim Bmp As Bitmap
Bmp.Initialize2(InputStream1)
InputStream1.Close
ImageView1.Bitmap = Bmp
End Sub