KateTest

作者在 2011-09-13 16:17:29 发布以下内容
class  KateTest{
       public  static  void main(String  args[]){
               menu();
               printDate();
       }
       public  static    void   menu(){
                 System.out.println("***********************");
                 System.out.println("郑州国通交通设施有限公司");
                 System.out.println("1.郑州标牌厂家");
                 System.out.println("2.郑州路牌厂家");
                 System.out.println("3.郑州停车场设施");
                 System.out.println("4.国通标牌");
                 System.out.println("关键字"); 
                 System.out.println("***********************");
       }
       public  static   void  printDate() throws ClassNotFoundException,SQLException{
                   System.out.println("The  SQL--JDBC");
                   Class.forName("com.jdbc.odbc.driver");
                   System.out.println("Load  class");
                   Connection con = DriverManager.getConnection("xe","jfei","jfei");
                   System.out.println("Get  Connection ");
                   String  sql  ="from  Customer  customer";
                   PrepareStatement  pstm  =  con.preparedStatement(sql)
                   ResultSet  rs  = pstm.executeUpdate(pstm);
                   if(rs.next()){
                      System.out.println(rs.getString("c_id"));
                   } 
                    rs.clsose();
                    pstm.close();
                    conn.close();
       }
}
xml | 阅读 807 次
文章评论,共0条
游客请输入验证码
浏览59754次
最新评论