关于WAV文件更新到数据库

03-03-22 struggle007

我用语句:

String wavfilename=request.getParameter("wavfile");

FileInputStream str=new FileInputStream(wavfilename);

String sql="insert into UserVmCfg(GreetingWavData) values(?)";

PreparedStatement pstmt=conn.prepareStatement(sql);

pstmt.setBinaryStream(1,str,str.available());

pstmt.execute();

out.println("Success,You Have Insert an Image Successfully");

}

就能将WAV文件成功的插入数据库中,可是由于实际需要,我现在想更新

数据库中的WAV文件,如果用UPDATE语句该怎么写呢?

beler
2003-03-24 11:17

try this code:

String sql="update UserVmCfg set GreetingWavData = (?)";

struggle007
2003-03-28 11:32

谢谢!