This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
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, firstname.lastname@example.org
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
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.