aspose file tools*
The moose likes JDBC and the fly likes Hi, I'm intrying to upload a file into an ORACLE Database, but I got strange errors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Hi, I Watch "Hi, I New topic
Author

Hi, I'm intrying to upload a file into an ORACLE Database, but I got strange errors

Leinad Jan
Greenhorn

Joined: Feb 18, 2009
Posts: 28
Hi,

my code is working fine until the last executeUpdate. I'm trying to upload a file into the Oracle Database.



Here is the last error stack trace I got :



Do you have any idea on what is not working correctly ? How do I define a valid LOB Locator ?

Thank you !
Fatih Keles
Ranch Hand

Joined: Sep 01, 2005
Posts: 182
Hi Leinad,

I don't know what is "FormFile data" is but using streams for updating BLOBs works.
Here is a sample, you may also find many samples on oracle network.

Regards,

Fatih.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30516
    
150

Leinad,
I usually use setBinaryStream() for BLOBs so I don't have deal with database specific code. It also eliminates the need to get a BLOB object before trying to write to the database.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Leinad Jan
Greenhorn

Joined: Feb 18, 2009
Posts: 28
Thank you for your help !
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Hi, I'm intrying to upload a file into an ORACLE Database, but I got strange errors