Insert Multiple BLOBs via ODBC
Posted: Wed Nov 24, 2010 8:23 am
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.
The size of the pictures is different.
Now want to attach the the thumbnails as blob to the next databaseupdate.
As Insert String I use the following (cannot post the code because I generated this in program) :
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.
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?
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()
Code: Select all
thumb1_size = MemorySize(*thumb1)
thumb2_size = MemorySize(*thumb2)
Code: Select all
SetDatabaseBlob(*db, 0, *thumb1, thumb1_size)
SetDatabaseBlob(*db, 1, *thumb2, thumb2_size)
Code: Select all
INSERT INTO IAIMAGE (IM_THUMBNAIL,IM_THUMBNAIL2,IM_IDFOLDER) VALUES(?,?,330096);
Code: Select all
dbms_lob.getlength(img.im_thumbnail)
dbms_lob.getlength(img.im_thumbnail2)
Has anyone a suggestion what I have done false?