Hello,
I'm trying to send to SQLITE a string with data type BASE64.
Any query for the record before entering the string with 64 type, gets return OK.
But after modifying the record by saving the "Image" field, a problem occurs, and any query returns error when accessing the record.
SQL structure:
-----------------------------
ID_Image (INT auto)
Image (BLOB) *//but I already tried TEXT
Code:
*// Base64Image library is correctly referenced.
*// Database is correctly associated with dbSQL.
Sub Globals
Dim Base64Con As Base64Image
End Sub
Sub Camera1_PictureTaken (Data() As Byte)
camera1.StartPreview
Dim out As OutputStream
out = File.OpenOutput(strFilePath, strFileName, False) 'strFilePath and strFileName is predefined.
out.WriteBytes(Data, 0, Data.Length)
out.Close
'convert Image to string
Dim B64Str As String
B64Str = Base64Con.EncodeFromImage(CaminhoExportar, strNomeArquivo)
dbSQL.ExecNonQuery("UPDATE tbl_image Set Image = '" & B64Str & "' WHERE ID_image = " & intImageCode) 'intImageCode is predefined.
End Sub
So far so good. No fault occurs.
The problem is that when accessing this data at another time, access error occurs in dbCursor.