HTML任务的c比

class DButilsTest {
	QueryRunner queryRunner = new QueryRunner();
	/**
	 * 测试QueryRunner类的 select方法.
	 */
	
	
	/**
	 * 测试QueryRunner类的  update方法.
	 * @throws Exception 
	 */
	@Test
	void testQueryRunnerUpdate() throws Exception {
		//1.创建queryrunner的实现类
		//2.使用其update方法
		String sql = "delete from TB520 where id in (?,?)";
		Connection connection = null;
		try {
			connection= jdbcTool.getConnection();
			queryRunner.update(connection, sql, 521,1314);
			//插入的方法queryrunner
			//queryRunner.insert(sql, rsh);
			
		} catch (Exception e) {
			e.printStackTrace();
		}finally {
			jdbcTool.releaseSourse(null, null, connection);
		}
	}

}

猜你喜欢

转载自blog.csdn.net/dianyanxia/article/details/82863652
今日推荐