Cannot upload file to Oracle DB using blob datatype
Hi
I am uploading a file to Oracle DB through JAVA. I am inserting the file as
a BLOB datatype. I am using JRUN 4 . But when I am uploading the file to the DB through my application it is not showing anything in the DB. The samp application is working fine on my QA environment on the same server . Is there some setting that needs to be done . Could this be a problem with the version of classes12.zip.
Also when i try to view the file it is giving me this error
ORA-06550: line 1, column 13:
PLS-00201: identifier 'DBMS_LOB' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Please help
# 1
Not sure afterall if you mean that you are having a pblm uploading (from what kind of file BTW?) or viewing after upload?
Try these tutorials - I found them very helpful. Also, do you have the 'PL/SQL Programming' book from Oracle Press? That has an entire chapter devoted to LOB types.
[url http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/blob/blob.html] How to deploy a PL/SQL function returning BLOB as Web Service[/url]
[url http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/advanced/LOBSample/LOBSample.java.html]LOBsample[/url]
HTH
# 2
I think its more of an access or rights issue rather than anything else.
If I execute this command on my QA DB it gives me a different error and on my production DB it gives me a different error
On QA
exec DBMS_LOB.FILEOPEN
Error : PLS-00306: wrong number or types of arguments in call to 'FILEOPEN'
on Production
PLS-00201: identifier 'DBMS_LOB' must be declared
I think it is an issue with priveleges to the user . Can someone help me with the syntax to grant priveleges to that user to the package that needs access
# 3
I'm in Oracle and did not get any such Errors. When Oracle complained that it could not access the Unix directory where the binary files were located that I wanted to load it told me I needed to specify a Grant - which I had, but it was slightly off - and then proceded to tell me exactly how to code the proper grant.
You also did not answer my question, so that I don't know what your getting an error on ... loading, viewing, what ... ?