hello everyone i am having a problem with inkpicture control and since i am not very expert with it i might need some help.
I save the ink into my table as a blob but i am not able to load it back for showing
PB 2019 R2 - Sql Anywhere 16
i've created a long binary field on a table of my database where i would like to store the ink as a signature
to store it i tried this:
integer li_return
blob lblb_ink
li_return = ip_1.save(lblb_ink, 0, true)
UPDATEBLOB interventi SET firma = :lblb_ink WHERE id_interventi = :il_id_int;
IF sqlca.SQLNRows > 0 THEN
COMMIT;
ELSE
messagebox("Error",sqlca.sqlerrtext, stopsign!, ok!)
END IF
if i try to save the blob lblb_ink coming from the ink control to a picture file using filewriteex it's working since i can open the file saved without problems.
Data is stored in the table but i am not sure if it is readable cause when i try to load it back into the ink control or simply on a picture control using setpicture it's showing nothing. I've tried to save the blob again to a picture file coming from the table and it is different in size from the original one and so cannot be loaded (looks like corrupted)
to retrieve data i am using selectblob blob lb_firma
long li_FileNum
selectblob firma into :lb_firma from interventi where id_interventi = :il_id_int;
if sqlca.sqlcode = 0 then
// li_FileNum = FileOpen("C:\start2\EMP_PICS.BMP", StreamMode!, Write!, Shared!, Replace!)
// FileWriteEx(li_FileNum, lb_firma)
// fileclose(li_FileNum)
p_1.setpicture(lb_firma)
ip_1.loadpicture(lb_firma)
end if
any ideas or an example could be helpful!
tia,
simone