long的写入
String sSql = "INSERT INTO news VALUES(?,?)";
PreparedStatement pstmt = con.prepareStatement(sSql);
String title=request.getParameter("bt");
String content=request.getParameter("txt1");
byte[] pic = content.getBytes("8859_1");
ByteArrayInputStream baisss = new ByteArrayInputStream(pic);
InputStreamReader bais = new InputStreamReader(baisss,"8859_1");
pstmt.setInt(1,id);
pstmt.setCharacterStream(3,bais,pic.length);
pstmt.execute();long的读出与String一样
String sSql = "INSERT INTO news VALUES(?,?)";
PreparedStatement pstmt = con.prepareStatement(sSql);
String title=request.getParameter("bt");
String content=request.getParameter("txt1");
byte[] pic = content.getBytes("8859_1");
ByteArrayInputStream baisss = new ByteArrayInputStream(pic);
InputStreamReader bais = new InputStreamReader(baisss,"8859_1");
pstmt.setInt(1,id);
pstmt.setCharacterStream(3,bais,pic.length);
pstmt.execute();long的读出与String一样
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货