<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
    統(tǒng)計(jì)
    • 隨筆 - 40
    • 文章 - 3
    • 評論 - 0
    • 引用 - 0

    導(dǎo)航

    常用鏈接

    留言簿(1)

    隨筆檔案(40)

    文章檔案(3)

    搜索

    •  

    最新評論

    閱讀排行榜

    評論排行榜

     
     

    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();

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

    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 2008-07-10 09:01 綠茶_鄭州 閱讀(67) 評論(0)  編輯  收藏

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


    網(wǎng)站導(dǎo)航:
     
     
    Copyright © 綠茶_鄭州 Powered by: 博客園 模板提供:滬江博客
    主站蜘蛛池模板: 亚洲性日韩精品一区二区三区 | 97公开免费视频| 久9热免费精品视频在线观看| 精品成在人线AV无码免费看 | 久久久久久久综合日本亚洲 | 一个人免费观看视频在线中文| 国产jizzjizz免费看jizz| 亚洲精品国产精品乱码不99| 久久久WWW成人免费精品| 国产亚洲精品精华液| 免费不卡在线观看AV| 免费国产精品视频| 国产AV日韩A∨亚洲AV电影| 久久久99精品免费观看| 久久久久亚洲Av无码专| 免费久久人人爽人人爽av| 亚洲av无码潮喷在线观看| 亚洲日韩在线中文字幕综合| 性短视频在线观看免费不卡流畅| 亚洲人成黄网在线观看| 日本免费在线中文字幕| 国产国拍精品亚洲AV片| 国产成人亚洲午夜电影| 亚洲男人av香蕉爽爽爽爽| 国产偷国产偷亚洲高清人| 亚洲毛片网址在线观看中文字幕| 国产午夜精品免费一区二区三区| 亚洲香蕉免费有线视频| 免费观看男人免费桶女人视频| 青青草国产免费国产是公开| 亚洲AV无码成人精品区蜜桃 | 日韩欧毛片免费视频| 国产成人综合亚洲| 亚洲AV人无码综合在线观看| 成人免费无码大片a毛片软件| 亚洲欧洲日产国产最新| 日韩免费观看一级毛片看看| 亚洲精品久久久久无码AV片软件| 亚洲一区二区三区在线视频| 免费看男女下面日出水来| 在线播放国产不卡免费视频|