String sql="insert into userlist(userId,userName, passw ,contactTel,email) " +"values(?,?,?,?,?)";Connection conn=null;PreparedStatement pstmt=null;try {conn=util.getConnection();pstmt=conn.prepareStatement(sql);pstmt.setString(1,user.getPersonName());} catch (SQLException e) {e.printStackTrace();}finally{util.colse(pstmt);util.colse(conn);答案应该是要把它转一下pstmt.setString(1,((user)user).getUserId());
添加回答
举报
0/150
提交
取消