zoukankan      html  css  js  c++  java
  • 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");

    路慢慢其休远羲,吾将上下而求所
  • 相关阅读:
    通过代码获取log4net的文件路径
    关键字后面不加空格
    ASP.NET MVC 4 Content Map
    ASP.NET Overview
    ASP.NET 4 and Visual Studio 2010
    Newtonsoft.Json
    ASP.NET MVC
    log4net
    AutoMapper introduction
    ajax jsonp跨域
  • 原文地址:https://www.cnblogs.com/garinzhang/p/2581714.html
Copyright © 2011-2022 走看看