• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

updating lobs in oracle database!

 
honey singh
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm making an application which updates files of any format into the database field using the Blob variable...now I'm able to write it in the database using the input and output streams....it 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 java....so 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...
Thanx,
harmanjeets@hotmail.com
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Adam
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic