When inserting or updating LOBs some major magic has to be performed behind the scenes to make it transparent.

updating table in dbi perl-87

Updating table in dbi perl video

In all cases where it can possibly work it out for itself, it does, however, if there are multiple LOB fields of the same type in the table then you need to tell it which field each LOB param relates to: $sth- Same answer.

Aside from the DB connections (which you can simulate with your own connect, that script is pretty basic. The DBD file says two things: In comments it says v1.57 (top line) under version it says $DBD:: Oracle:: Version = '0.54'; Im guessing it might be sort of old. It looks pretty definite that my problems were based on DBI.

However, thoellri you did give me a lot of info, so i'm going to figure how many points to give.

Here's a "putting all the technology together" demonstration ...

I'm quite aware of the advantages to storing it on disk, howeve, I asked the question for a reason.

My simple question remains, example of some source code using DBI that packs and unpacks a gif file to store it as a BLOB.

However this does not work, because ORacle seems to want the stuff in Hex, and you get an invalid hex format oracle error. But when i attempt to do the retrieve (as stated in the book), it gives me an oracle invalid type comparison error. Can I assume, that you still have to convert it into a hex string?

I was unable to get pack and unpack to create the hex proerly, so I had to use ord to get the ascii, and then pack from there. However, when i do the insert, it gives me a warning, something about SQL type (large negative number) (null) is not fully supported bound as varchar instead. hmm, i know about the Long Read Len, but i will try your suggestion tomorrow, and let you know. If so does anyone have a valid pack example converting entire gif into a hex string.

Ok, I have the DBI book, and im fairly familiar with it for all the basic stuff. the filename you can easily represent using VARCHAR.

See - you will need that image on the disk anyway, and the time you'll spend on inserting and extracting the image from/to the table, is a waste.

(Oh, im able to convert it, but with a hack i wrote, and id prefer to be more elegant with pack if i can) pack of the entire file never seems to work properly for me.