java对sqlserver的image字段读取和存储
注意:连接sqlserver数据库需配置其驱动文件
存储的代码:
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection con = DriverManager.getConnection(url, user, password);
String sql="update AA001 set PHOTO = ? WHERE AA001_ID ='52800'";
PreparedStatement ps=con.prepareStatement(sql);
File f = new File("C:/Users/Administrator/Desktop/bdsoft/photos/1.jpg");
FileInputStream input= new FileInputStream