Hello,
I've go a Oracle 10g database and want to store two thumbnail pictures in one row. The two thumbnails are each in a memory.
Code: Select all
*thumb1 = imagecontainer\SaveToBlob()
*thumb2 = imagecontainer\SaveToBlob()
The size of the pictures is different.
Code: Select all
thumb1_size = MemorySize(*thumb1)
thumb2_size = MemorySize(*thumb2)
Now want to attach the the thumbnails as blob to the next databaseupdate.
Code: Select all
SetDatabaseBlob(*db, 0, *thumb1, thumb1_size)
SetDatabaseBlob(*db, 1, *thumb2, thumb2_size)
As Insert String I use the following (cannot post the code because I generated this in program) :
Code: Select all
INSERT INTO IAIMAGE (IM_THUMBNAIL,IM_THUMBNAIL2,IM_IDFOLDER) VALUES(?,?,330096);
No error is reported. To get the blob through a query I need the size. The DatabaseColumnSize hasn't reflected the size of the blob, it always gives the maximum size of blob (I think oracle driver specific). This function is correct and returns the needed memory size.
Code: Select all
dbms_lob.getlength(img.im_thumbnail)
dbms_lob.getlength(img.im_thumbnail2)
But the size is always the value of thumb1_size. So the second thumbnail (IM_THUMBNAIL2) isn't displayed correctly and retrieving the picture from the database causes a unreadable picture.
Has anyone a suggestion what I have done false?