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

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

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

    Java Study Center  
    日歷
    <2008年7月>
    293012345
    6789101112
    13141516171819
    20212223242526
    272829303112
    3456789
    統計
    • 隨筆 - 40
    • 文章 - 3
    • 評論 - 0
    • 引用 - 0

    導航

    常用鏈接

    留言簿(1)

    隨筆檔案(40)

    文章檔案(3)

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

     
     

    1、Oracle8/8i/9i數據庫(thin模式)

    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();

    String url="jdbc:oracle:thin:@localhost:1521:orcl"; //orcl為數據庫的SID

    String user="test";

    String password="test";

    Connection conn= DriverManager.getConnection(url,user,password);

    2、DB2數據庫

    Class.forName("com.ibm.db2.jdbc.app.DB2Driver ").newInstance();

    String url="jdbc:db2://localhost:5000/sample"; //sample為你的數據庫名

    String user="admin";

    String password="";

    Connection conn= DriverManager.getConnection(url,user,password);

    3、SQL Server7.0/2000數據庫

    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();

    String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydb";

    //mydb為數據庫

    String user="sa";

    String password="";

    Connection conn= DriverManager.getConnection(url,user,password);

    4、Sybase數據庫

    Class.forName("com.sybase.jdbc.SybDriver").newInstance();

    String url =" jdbc:sybase:Tds:localhost:5007/myDB";//myDB為你的數據庫名

    Properties sysProps = System.getProperties();

    SysProps.put("user","userid");

    SysProps.put("password","user_password");

    Connection conn= DriverManager.getConnection(url, SysProps);

    5、Informix數據庫

    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為數據庫名

    Connection conn= DriverManager.getConnection(url);

    6、MySQL數據庫

    Class.forName("org.gjt.mm.mysql.Driver").newInstance();

    //或者Class.forName("com.mysql.jdbc.Driver");

    String url ="jdbc:mysql://localhost/myDB?

    user=soft&password=soft1234&useUnicode=true&characterEncoding=8859_1"

    //myDB為數據庫名

    Connection conn= DriverManager.getConnection(url);

    7、PostgreSQL數據庫

    Class.forName("org.postgresql.Driver").newInstance();

    String url ="jdbc:postgresql://localhost/myDB" //myDB為數據庫名

    String user="myuser";

    String password="mypassword";

    Connection conn= DriverManager.getConnection(url,user,password);

    8、access數據庫直連用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 2008-07-10 09:01 綠茶_鄭州 閱讀(68) 評論(0)  編輯  收藏

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


    網站導航:
     
     
    Copyright © 綠茶_鄭州 Powered by: 博客園 模板提供:滬江博客
    主站蜘蛛池模板: 777亚洲精品乱码久久久久久| 亚洲综合色成在线播放| 亚洲色图.com| 99爱在线观看免费完整版| 久久亚洲中文字幕精品有坂深雪 | 999久久久免费精品播放| 亚洲精品无码av人在线观看| 黄色网站软件app在线观看免费| 亚洲精品午夜无码专区| 97人妻精品全国免费视频| 色噜噜综合亚洲av中文无码| 日韩免费无码一区二区三区| 亚洲狠狠狠一区二区三区| 免费观看AV片在线播放| 亚洲欧洲国产综合AV无码久久| 国产成人免费a在线视频色戒| 黄页网站在线观看免费| 亚洲精品无码乱码成人| 久久久久免费看成人影片| 香蕉大伊亚洲人在线观看| 又粗又大又猛又爽免费视频| 一个人免费播放在线视频看片| 亚洲av综合av一区| 国产又黄又爽又猛免费app| 亚洲精品国产suv一区88 | 免费中文熟妇在线影片| 国产成人精品日本亚洲语音| 亚洲另类激情专区小说图片| 国产一精品一AV一免费| 亚洲不卡1卡2卡三卡2021麻豆| 蜜臀91精品国产免费观看| 国产美女视频免费观看的网站| 亚洲一区精品中文字幕| 免费激情视频网站| 你懂的网址免费国产| 亚洲欧洲另类春色校园网站| 亚洲高清无码在线观看| 国产国产人免费视频成69堂| 无人视频在线观看免费播放影院| 亚洲国产人成在线观看69网站 | 1024免费福利永久观看网站|