public static void main(String [] args) throws SQLException, ClassNotFoundException
	{
		String JDBCDriver = "sun.jdbc.odbc.JdbcOdbcDriver";
		String connecterString = "jdbc:odbc:test";
		Connection con = null;
		Statement stmt = null;
		ResultSet res = null;
		Class.forName(JDBCDriver);
		con = DriverManager.getConnection(connecterString, "java", "java");
		stmt = con.createStatement();
		res = stmt.executeQuery("select * from stu_info;");
		while(res.next()){
			System.out.print(res.getInt("ID") + " ");
			System.out.println(res.getInt("stu_age"));
		}
		
		stmt.executeUpdate("Insert into stu_info values(10, 'chenyq', 'M', 2010011113, 22, 6)");
		System.out.println("添加数据后");
		res = stmt.executeQuery("select stu_name from stu_info");
		while(res.next()){
			System.out.println(res.getString("stu_name"));
		}
		
		stmt.executeUpdate("delete from stu_info where ID=3");
		System.out.println("删除数据后");
		res = stmt.executeQuery("select stu_name from stu_info");
		while(res.next()){
			System.out.println(res.getString("stu_name"));
		}
		
		stmt.close();
		con.close();
	}