Sub Chooser_Result (Success As Boolean, Dir As String, FileName As String)
.
.
If Success Then
'display the chosen image in ImageView
Dim bmp As Bitmap
bmp.Initialize(Dir, FileName)
ImageView1.Bitmap = bmp
'Ask user if they want to save the image to DB ..
'convert the image file to a bytes array
Dim InputStream1 As InputStream
InputStream1 = File.OpenInput(Dir, FileName)
Dim OutputStream1 As OutputStream
OutputStream1.InitializeToBytesArray(1000)
File.Copy2(InputStream1, OutputStream1)
Dim Buffer() As Byte 'declares an empty array
Buffer = OutputStream1.ToBytesArray
'If I want to Insert I want to go to Sub ADD
Activity2.SQL1.ExecNonQuery2("INSERT INTO persons VALUES( NULL, NULL,NULL, NULL,NULL, NULL, NULL, 'Resim')", Array As Object(Buffer))
'If we click Update
'Query ="UPDATE persons Set Resim = ? WHERE ID = " & Activity2.IDList.Get(Activity2.CurrentIndex)
'Activity2.SQL1.ExecNonQuery2(Query, Array As Object(Buffer))
End Sub