Class.forName("oracle.jdbc.driver.OracleDriver");
SimpleDataSource dataSource = new SimpleDataSource();
dataSource.setJdbcUrl("jdbc:oracle:thin:@192.168.74.134:1521:orcl");
dataSource.setUsername("ocean");
dataSource.setPassword("ocean");
Dao dao = new NutDao(dataSource);
System.out.println("初始化完成");
List<NutMap> list = new ArrayList<NutMap>();
NutMap nutMap = new NutMap();
nutMap.addv("PGT060101", new Date().getTime()+1000);
nutMap.addv(".table", "TGT060101");
nutMap.addv("A3001200400", null);// 该语句造成nutz使用StringAdapter处理该字段,而数据库中有date类型???
list.add(nutMap);
nutMap = new NutMap();
nutMap.addv("PGT060101", new Date().getTime()+2000);
nutMap.addv("A3001200400", new Date());
list.add(nutMap);
dao.fastInsert(list);
2 回复
添加回复
请先登陆