Converting Data From Blob Table For Display
Posted: Wed Jul 04, 2012 6:25 pm
I am storing jpeg images to a BLOB table in a Valentina DB with a LiveCode Front and the SQL Yoga Library
I can easily retrieve the binary data from the DB BLOB field "GYN_TF" and store it in a variable.
put sqlquery_createObject("GYN_TF") into theQueryA
sqlquery_set theQueryA, "select clause", "GYN_IMAGES"
put "GYN_TF.DBID = $" into theConditions
replace "$" with CaseN in theConditions
sqlquery_set theQueryA, "Conditions", theConditions
sqlquery_retrieveAsArray theQueryA, theDataA
put the result into theError
put the keys of theDataA[1] & cr & theDataA[1]["GYN_IMAGES"] into ImageHold1
delete line 1 of ImageHold1
How do I convert the binary data in the variable ImageHold1 back to an image for display in LiveCode?
Thanks in advance,
Jorge
I can easily retrieve the binary data from the DB BLOB field "GYN_TF" and store it in a variable.
put sqlquery_createObject("GYN_TF") into theQueryA
sqlquery_set theQueryA, "select clause", "GYN_IMAGES"
put "GYN_TF.DBID = $" into theConditions
replace "$" with CaseN in theConditions
sqlquery_set theQueryA, "Conditions", theConditions
sqlquery_retrieveAsArray theQueryA, theDataA
put the result into theError
put the keys of theDataA[1] & cr & theDataA[1]["GYN_IMAGES"] into ImageHold1
delete line 1 of ImageHold1
How do I convert the binary data in the variable ImageHold1 back to an image for display in LiveCode?
Thanks in advance,
Jorge