This content has been marked as final. Show 2 replies
I'm not sure you've landed in the correct forum as this doesn't seem like an ODP.NET question. It seems more like a PL/SQL question and that forum is located here:
However, in response to your question:
799701 wrote:The answer is you don't. As noted in the documentation a bfile is read-only:
-- My Question is how to open a bfile in write mode and then how to write content of blob into location pointed by the bfile.....
"The BFILE data type enables read-only support of large binary files. You cannot modify or replicate such a file."
Source, Oracle Database SQL Language Reference:
You're also using a non-existent constant (DBMS_LOB.FILE_READWRITE), missing the package qualifier on two calls (read and write) and are masking valuable information should an exception be raised with that "when others".
In any case, you might find that UTL_FILE in combination with a DIRECTORY that points to the same location as the BFILE will be enough to satisfy your requirement. But, this is better suited to the PL/SQL forum in my view.
As always, corrections, clarifications, etc. welcome.