I'm making web application usin JSP....now I want to update data in the blob field which I'm doing like this
cmd="select * from transaction where trans_no='"transacId+"'";
rs=stmt.executeQuery(cmd);
file=new java.io.File(filePathName);
long f_size=file.length();
buffer=new byte[(int)f_size];
instream=new FileInputStream(file);
length=-1;
while((length=instream.read(buffer))!=-1)
{
}
rs.updateBytes("f_file",buffer);
rs.updateRow();
where f_file is the blob field....
Is this way ok? actually when I try the same thing with class and compile it using jdk then it gives the following excwption:
"java.lang.UnsupportedOperationException"
so this means there will be same error in
JSP?
If this is not ok please suggest me some other way of doin this..
thanx in advance!
[ August 22, 2005: Message edited by: Bear Bibeault ]