This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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, email@example.com
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.