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.

About this Entry

This page contains a single entry by published on May 12, 2006 10:33 AM.

EDI Week was the previous entry in this blog.

File upload continues is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.23-en