<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 495,  comments - 11,  trackbacks - 0

    1.Oracle8/8i/9i數(shù)據(jù)庫(thin模式)

    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    String url="jdbc:oracle:thin:@localhost:1521:orcl"; //orcl為數(shù)據(jù)庫的SID
    String user="test";
    String password="test";
    Connection conn= DriverManager.getConnection(url,user,password);

    2.DB2數(shù)據(jù)庫

    Class.forName("com.ibm.db2.jdbc.app.DB2Driver ").newInstance();
    String url="jdbc:db2://localhost:5000/sample"; //sample為你的數(shù)據(jù)庫名
    String user="admin";
    String password="";
    Connection conn= DriverManager.getConnection(url,user,password);

    3.Sql Server7.0/2000數(shù)據(jù)庫

    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
    String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydb";
    //mydb為數(shù)據(jù)庫
    String user="sa";
    String password="";
    Connection conn= DriverManager.getConnection(url,user,password);

    4.Sybase數(shù)據(jù)庫

    Class.forName("com.sybase.jdbc.SybDriver").newInstance();
    String url =" jdbc:sybase:Tds:localhost:5007/myDB";//myDB為你的數(shù)據(jù)庫名
    Properties sysProps = System.getProperties();
    SysProps.put("user","userid");
    SysProps.put("password","user_password");
    Connection conn= DriverManager.getConnection(url, SysProps);

    5.Informix數(shù)據(jù)庫

    Class.forName("com.informix.jdbc.IfxDriver").newInstance();
    String url = "jdbc:informix-sqli://123.45.67.89:1533/myDB:INFORMIXSERVER=myserver;
    user=testuser;password=testpassword"; //myDB為數(shù)據(jù)庫名
    Connection conn= DriverManager.getConnection(url);

    6.MySQL數(shù)據(jù)庫

    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    String url ="jdbc:mysql://localhost/myDB?user=soft&password=soft1234&useUnicode=true&characterEncoding=8859_1"
    //myDB為數(shù)據(jù)庫名
    Connection conn= DriverManager.getConnection(url);

    7.PostgreSQL數(shù)據(jù)庫

    Class.forName("org.postgresql.Driver").newInstance();
    String url ="jdbc:postgresql://localhost/myDB" //myDB為數(shù)據(jù)庫名
    String user="myuser";
    String password="mypassword";
    Connection conn= DriverManager.getConnection(url,user,password);

    8.access數(shù)據(jù)庫直連用ODBC的

    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") ;
    String url="jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ="+application.getRealPath("/Data/ReportDemo.mdb");
    Connection conn = DriverManager.getConnection(url,"","");
    Statement stmtNew=conn.createStatement() ;

    posted on 2007-05-25 23:00 jadmin 閱讀(69) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發(fā)表評論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 亚洲人成777在线播放| 久久亚洲AV成人无码电影| 亚洲人配人种jizz| 亚洲人成电影网站免费| 亚洲乱码在线播放| 无码高潮少妇毛多水多水免费| 激情内射亚洲一区二区三区爱妻| 97性无码区免费| 午夜在线a亚洲v天堂网2019| 色妞WWW精品免费视频| 色窝窝亚洲AV网在线观看| 免费中文字幕不卡视频| 一区二区免费电影| 亚洲av无码片在线播放| 51精品视频免费国产专区| 亚洲国产成人va在线观看网址| 中文字幕无码成人免费视频| 亚洲男同gay片| 亚洲精品成人在线| 波多野结衣免费一区视频| 久久精品国产亚洲av影院| 毛片免费观看网址| 黄网站色视频免费看无下截| 亚洲精品美女久久777777| 精品福利一区二区三区免费视频| 最新亚洲卡一卡二卡三新区 | 最近免费mv在线电影| 精品亚洲AV无码一区二区| 日本一区二区三区日本免费| 又大又硬又粗又黄的视频免费看| 亚洲a在线视频视频| 成年男女男精品免费视频网站| 国产av无码专区亚洲av毛片搜| 亚洲AV中文无码乱人伦下载| 搡女人免费视频大全| a一级毛片免费高清在线| 亚洲国产精品成人综合色在线婷婷 | 成年女人18级毛片毛片免费| 草久免费在线观看网站| 久久久亚洲欧洲日产国码是AV| 麻豆成人精品国产免费|