File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes updating lobs in oracle database! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "updating lobs in oracle database!" Watch "updating lobs in oracle database!" New topic

updating lobs in oracle database!

honey singh
Ranch Hand

Joined: Apr 26, 2002
Posts: 44
I'm making an application which updates files of any format into the database field using the Blob I'm able to write it in the database using the input and output is getting loaded into the database, but when I retrieve it then it creates the file there but with the length of the file zero.....
This was the first problem and now the second thing is that I want to know how to open the file of different format....I mean if it is text file then open it by text editor, if it is image file then open it with image editor....
I'm making the application using please anybody can tell me how to know which file opens with which thing and how to read from the database field so that it doesn't give file of zero length...
Adam Hardy
Ranch Hand

Joined: Oct 09, 2001
Posts: 567
Presumably you are trying to write the file to a hard drive? Is this on NT or Unix? If on Unix, does the app have permission / rights?
The answer to your second question is way over my head, but either the whole question is OS dependent or you need to find a class that will get the necessary info from whichever OS. Somebody else should jump in on this one! Actually it's not strictly JDBC this bit - you might have more luck in the Java in General forums.

I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
I agree. Here's the link:
subject: updating lobs in oracle database!
It's not a secret anymore!