storing image to Database
-
hi all, how can i store the image file(.jpg,.gif,.bmp etc) to database. i am using SQl Server 2000. what will be the datatype of the field thank you all
-
type : binary. works fine for me for jpg, jpg, bmp and so...
TOXCCT >>> GEII power
[toxcct][VisualCalc] -
type : binary. works fine for me for jpg, jpg, bmp and so...
TOXCCT >>> GEII power
[toxcct][VisualCalc]Why are use type data is image
-
Why are use type data is image
-
actually, i did it wihin a java code, but the server was a SQL Server 2000. do you want it nevertheless ?
TOXCCT >>> GEII power
[toxcct][VisualCalc] -
if (getPicture() != null) {
ByteArrayInputStream inStream;
inStream = new ByteArrayInputStream(getPicture());
rqt.setBinaryStream(1, inStream, inStream.available());
// Where rqt is a PreparedStatement
}in my bean :
private byte\[\] picture; public byte\[\] getPicture() { return picture; }
TOXCCT >>> GEII power
[toxcct][VisualCalc]