Java Connection driver and URLs for various databases

Source: Internet
Author: User

summed up the Java connection to the various databases to use the driver name and URL:

1, Oracle

Driver:oracle.jdbc.driver.OracleDriver

URL: "Jdbc:oracle:thin: @localhost:" +port+ ":" +databasename;

2, SQL server7.0/2000

Driver:com.microsoft.jdbc.sqlserver.SQLServerDriver

URL: "Jdbc:microsoft:sqlserver://localhost:" +port+ ";D atabasename=" +databasename;

3, DB2

Driver:com.ibm.db2.jdbc.app.DB2Driver

Url:jdbc:db2://localhost: "+port+"/"+databasename";

4, Informix

Driver:com.informix.jdbc.IfxDriver

URL: "jdbc:informix-sqli://"/"+url+"/"+databasename+": informixserver=myserver;

User= "+user+";p assword= "+password;

5. Sybase

Driver:com.sybase.jdbc.SybDriver

URL: "Jdbc:sybase:Tds:localhost:" +port+ "/" +databasename;

6, MYSQL

Driver:org.gjt.mm.mysql.Driver or Com.mysql.jdbc.Driver

Url:jdbc:mysql://localhost: "+port+"/"+databasename";

7, PostgreSQL

Driver:org.postgresql.Driver

URL: "jdbc:postgresql://localhost/" +databasename;

8. Visual Foxpro

Driver:sun.jdbc.odbc.JdbcOdbcDriver

URL: "Jdbc:odbc:driver={microsoft Visual FoxPro driver}; SOURCETYPE=DBF; sourcedb= "+ (full path name of your DBF datasheet, including filename);

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.