I'm a little newish to java, but really new to sql server and datatype image.
I am trying to extract files from the database and store them locally on the computer. I have retrieved the image contains from the column with rs.getBlob, and have saved them to the system with the following code:
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(fileName));
bos.write(blob.getBytes( 1, (int) blob.length()), 0, (int) blob.length() );
This does save the file, but I can't open the file no matter what I change the extension to. The kicker is that I don't know what each file is suppose to be, the database does not contain the names of the files either.