import java.sql.*;
public class Employee
{
	public static void main(String args[])
 	 { 
		Statement st;
		Connection con;
		try{
			System.out.println("正在连接数据库...");
			Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
		   }
		catch(ClassNotFoundException e){} ;
		try{
			con=DriverManager.getConnection("jdbc:odbc:aaa","",""); 
			System.out.println("已经连接到数据库...");
			st=con.createStatement();
    			 ResultSet rs=st.executeQuery("SELECT job_desc from jobs ");
    
     			while(rs.next())
    			  {   String name=rs.getString("job_desc"); 
     			      System.out.println(name);
       			}
			
			rs.close();
			st.close();
       			con.close(); 
    		 }
   		catch(SQLException e1) {System.out.println("异常"+e1);}
 	} 
}

