Or often I have been using this code to save and return an image in a blob SqlLite
Code: Select all
---This is for inserting a blob
--get the text of the image
set the text of image "SelectedImage" to gPicData
--base64encode the text of the image
put base64encode(gPicData) into gPicData
--build the insert sql
put "INSERT INTO tblImages (ImageFile) VALUES (:1)" into theSQL
--execute the insert, note the '*b' in front of the variable name, that's important
revExecuteSQL dbConnID, theSQL, "*bgPicData"
--This is for retrieving a blob
--build the select sql
put "SELECT ImageFile FROM tblImages WHERE Image_Key = 1" into tSQL
--execute the select
put revQueryDatabase(dbConnID, tSQL) into tRecordSet
-- Retrieve the binary data from the record set.
put revDatabaseColumnNamed(tRecordSet, "ImageFile") into theImage
--we encoded the data when we put it in, so we have to decode it when we take it out
put base64decode(theImage) into theImage
--setting the text puts the image in the image area
set the text of image "RetrievedImage" to theImage
But the suggestion does not work, or rather I need to run an UPDATE but I can not write code utille. With a tool I see that the blob field contains something but I can not then redisplay it as in the image field
Thank's to all
Mimmo