日期:2014-05-20 浏览次数:20931 次
public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new FileReader("E:/test.txt")); String line = null; while ((line = reader.readLine()) != null) { String[] vStrs = line.split("\\:"); String bt = vStrs[0]; String nr = vStrs[1]; // excuteSQL.executeSql("insert into dwd(bt,nr) values('" + bt + "','" + nr + "');"); // 这边执行sql就可以了。 System.out.println("bt=" + bt + ",nr=" + nr); } }