Hi.... I load a image form a BLOB record using GetBlob and this image need write to another BLOB record
I can't get the correct data to put into the Query chain.
I try this:
I get the image stored in 'Imagen' BLOB record where Codigo = 'BUB11000001' "FIRST RECORD" (previously loaded with an external SQLite editor)
And store it in Buffer
And next I try to write this image into 'Imagen' BLOB record where Codigo = 'BUB11000006' in a SQLite database but the image don't store in the BLOB format.
Can anything help me.... Thank's a Lot!!!!
I can't get the correct data to put into the Query chain.
I try this:
Globals:
Dim Buffer() As Byte
Dim SQLString As String
Dim CursorDB As ResultSet
Dim SQL1 As SQL
Dim bmp As B4XBitmap
I get the image stored in 'Imagen' BLOB record where Codigo = 'BUB11000001' "FIRST RECORD" (previously loaded with an external SQLite editor)
And store it in Buffer
Get Image from BLOW Record:
SQLString="select * FROM Productos where Codigo=('BUB11000001')"
CursorDB = SQL1.ExecQuery(SQLString)
Buffer = CursorDB.GetBlob("Imagen")
If Buffer<>Null Then
bmp = CMDSub.BytesToImage(Buffer)
CMDSub.FitImageToView(bmp, ImageView1) 'CMDSub -->External Module and FitToView (Scale the image)
End If
And next I try to write this image into 'Imagen' BLOB record where Codigo = 'BUB11000006' in a SQLite database but the image don't store in the BLOB format.
SQLite store:
SQLString="UPDATE Productos SET Imagen='"& Array As Object(Buffer) &"' where Codigo=('BUB11000006')"
Log(SQLString)
SQL1.ExecNonQuery(SQLString)
Can anything help me.... Thank's a Lot!!!!