Summary of multiple common JDBC drivers

Source: Internet
Author: User
Tags sybase support microsoft
Download the JDBC driver of multiple database systems (Oracle, sqlserver, DB2, etc.)
Data Base Description
MySQL Http://www.mysql.com/products/connector/j/ shipped. but need to download the latest for MySQL 4.1 or higher.
Oracle The http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html has ded.
SQL Server by jtds Http://jtds.sourceforge.net/shortded. Support Microsoft SQL Server (6.5, 7, 2000 and 2005)
SQL Server by Microsoft Http://www.microsoft.com/downloads/details.aspx? Familyid = E22BC83B-32FF-4474-A44A-22B6AE2C4E17 & displaylang = ZH-CN encoded ded. Support Microsoft SQL Server (6.5, 7, 2000 and 2005)
Postgres Http://jdbc.postgresql.org/download.html shortded 7.3 JDBC 3
SAP DB The http://www.sapdb.org/sap_db_jdbc.htm has ded.
Sybase by jtds Http://jtds.sourceforge.net/sorted ded. Support Sybase (10, 11, 12)
  JDBC connection string for common databases
1. Access
Class. forname ("Sun. JDBC. ODBC. jdbcodbcdriver ");
Connection Cn = drivermanager. getconnection ("DBC: ODBC: Driver = {Microsoft Access Driver (*. MDB)}; DBQ = F: // data. mdb ", susr, spwd ); 2. MySQL(Http://www.mysql.com) Mm. mysql-2.0.2-bin.jar
Class. forname ("org. gjt. Mm. MySQL. Driver ");
CN = drivermanager. getconnection ("JDBC: mysql: // mydbcomputernameorip: 3306/mydatabasename", susr, spwd );
Or:
Class. forname ("com. MySQL. JDBC. Driver ");
CN = drivermanager. getconnection ("JDBC: mysql: // localhost: 3306/mydata? User = root & Password = root "); 3. Microsoft sqlserverHttp://jtds.sourceforge.net)
Class. forname ("net. SourceForge. jtds. JDBC. Driver ");
CN = drivermanager. getconnection ("JDBC: jtds: sqlserver: // mydbcomputernameorip: 1433/master", susr, spwd ); 4. Microsoft sqlserverHttp://www.microsoft.com)
Class. forname ("com. Microsoft. JDBC. sqlserver. sqlserverdriver ");
CN = drivermanager. getconnection ("JDBC: Microsoft: sqlserver: // mydbcomputernameorip: 1433; databasename = Master", susr, spwd ); 5. Oracle(Http://www.oracle.com/ip/deploy/database/oracle9i/) classes12.zip
Class. forname ("oracle. JDBC. Driver. oracledriver ");
CN = drivermanager. getconnection ("JDBC: oracle: thin: @ mydbcomputernameorip: 1521: orcl", susr, spwd ); 6. Sybase(Http://jtds.sourceforge.net) jconn2.jar
Class. forname ("com. Sybase. jdbc2.jdbc. sybdriver ");
CN = drivermanager. getconnection ("JDBC: Sybase: TDS: mydbcomputernameorip: 2638", susr, spwd );
// (Default-username/password: "dba"/"SQL ") 7. ODBC
Class. forname ("Sun. JDBC. ODBC. jdbcodbcdriver ");
Connection Cn = drivermanager. getconnection ("JDBC: ODBC:" + sdsn, susr, spwd ); 8. DB2
Class. forname ("com.ibm.db2.jdbc.net. db2driver ");
String url = "JDBC: DB2: // 192.9.200.108: 6789/sample"
CN = drivermanager. getconnection (URL, susr, spwd ); 9. PostgreSQL(Http://www.de.postgresql.org) pgjdbc2.jar
Class. forname ("org. PostgreSQL. Driver ");
CN = drivermanager. getconnection ("JDBC: PostgreSQL: // mydbcomputernameorip/mydatabasename", susr, spwd );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.