Android Question SQLiteException in GetBlob

welu1805

Active Member
Licensed User
Longtime User
Hello,

I get the error: SQLiteException: unknown error (code0) INTEGER data in nativeGetBlob

B4X:
Dim curs As Cursor
curs = Main.dbSQL.ExecQuery("SELECT * FROM sortedtexts WHERE PK=" & Main.TextPK)
curs.Position = 0

Dim blobBuffer() As Byte
blobBuffer = curs.GetBlob("Blobres")

The field "Blobres" is empty.

Does anyone know what is the problem?

Thanks
Lutz
 

welu1805

Active Member
Licensed User
Longtime User
Hi Erel,

sorry, but I changed my code for inserting a new record to a parameterized query nad had a wrong number of parameters, so in the blob field was an integer value stored. I fixed this and now it works as expected.

Thank you.
 
  • Like
Reactions: eps
Upvote 0
Top