日期:2014-05-17 浏览次数:20646 次
Connection conn= JDBCUtil.getConnection(); String sql="insert into accounts values('?','?','?','?','?','?')"; PreparedStatement pre= conn.prepareStatement(sql); pre.setString(1, cardId); pre.setString(2, password); pre.setBigDecimal(3, new BigDecimal( balance)); pre.setString(4, email); pre.setString(5, visible); pre.setDate(6, new java.sql.Date(2012,1,21)); pre.executeUpdate();