[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]数据类型 image 和 nvarchar 在 equal to 运算符中不兼容。
public void Insert() {
try {
String sql="insert into picture values(?,?)";
PreparedStatement ps=conn.prepareStatement(sql);
File f =new File("E:/1.jpg");
FileInputStream input= new FileInputStream(f);
ps.setString(1,"nvarchar");
ps.setBinaryStream(2, input,(int)f.length());
ps.executeUpdate();
ps.close();
input.close();
}
数据库我存的是image格式的,不知道java这个应该怎么改