• Driver集合


    Mysql(driverdownload: http://mysql.cs.pu.edu.tw/Downloads/Connector-J/mysql-connector-java-5.1.6.zip):

      Class.forName("com.mysql.jdbc.Driver");

      Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/cmsjsp?user=root&password=");

    Oracle(driverdownload: ):

      Method1: JDBC Driver

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

        Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@hocalhost:1521:dbname", "scott", "tiger");

      Method2: JDBC-ODBC

        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

        Connection conn = DriverManager.getConnection("jdbc:odbc:localhost", "scott", "tiger");

    SQLServer:

      Method1: JDBC Driver

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

        Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=dbname", "scott", "tiger");

      Method2: JDBC-ODBC

        Class.forName("net.sourceforge.jtds.jdbc.Driver");

        Connection conn = DriverManager.getConnection("jdbc:jtds:sqlserver://localhost:1433/dbname", "scott", "tiger");

    路慢慢其休远羲,吾将上下而求所
  • 相关阅读:
    hdu 1203 I NEED A OFFER! (01背包)
    链式前向星
    hdu 3790 最短路问题 (spfa练手)
    hdu 2859 Phalanx (最大对称子矩阵)
    hdu 1160 FatMouse's Speed (最长上升子序列+打印路径)
    hdu 5289 Assignment (ST+二分)
    vue环境配置 vue-cli脚手架
    1、初始Java应用程序
    HTML5之Canvas画正方形
    布尔表达式
  • 原文地址:https://www.cnblogs.com/garinzhang/p/2581714.html
Copyright © 2020-2023  润新知