« EDI Week | Main | File upload continues »
May 12, 2006
File upload to oracle
I'm attempting to figure out a way to upload files from a web application and store them in the oracle database. So far, I don't seem to be making the great strides of advance as I'd hoped, so I've rangled Alex to help with the research. I've been testing with multiple places for the directory, with no success. Here's the code snippet I've tried:
vfile := bfilename(vdir, 'Test.doc'); vsize := dbms_lob.getlength(vfile); insert into blobfiles (myfile, fseq) values (empty_blob(), 1) returning myfile into vdoc;
dbms_lob.fileopen(vfile);
dbms_lob.loadfromfile(vdoc, vfile, vsize);
dbms_lob.fileclose(vfile);
Alex suggested that maybe it's a permissions error, so I'll try to ask Ron about this. However, with different directories, I seem to be getting different errors. The latest was ORA-01460: unimplemented or unreasonable conversion request. Googleing has pulled up a whole lot of nothing, so I'm moving on to other options.
There have been quite a few posting using MySQL and PHP. Since we have both of those up here, I may just attempt to get that working and then go from there.
Posted by runyans at May 12, 2006 10:33 AM