1. 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);
2. PostgreSQL (http://www.de.postgreSql.org) pgjdbc2.jar
Class.Forname ("Org.PostgreSql.driver);
CN = DriverManager.getConnection ("JDBC: PostgreSQL: // MyDbComputernameorip / MyDatabaseName", SUSR, SPWD);
3. Oracle (http://www.racle.com/ip/deploy/database/oracle9i/) CLASSES12.ZIP
Class.Forname ("Oracle.jdbc.driver.OracleDriver");
CN = DriverManager.getConnection ("JDBC: Oracle: Thin: @MydbComputernameorip: 1521: Orcl", SUSR, SPWD);
4. 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")
5. Microsoft SQLServer (http://jtds.sourceforge.net)
Class.Forname ("Net.SourceForge.jtds.jdbc.driver");
CN = DriverManager.getConnection ("JDBC: JTDS: SQLServer: // MYDBComputernameorip: 1433 / Master", SUSR, SPWD);
6. Microsoft SQLServer (http://www.microsoft.com)
Class.Forname ("com.microsoft.jdbc.sqlser.sqlserverdriver);
CN = DriverManager.getConnection ("JDBC: Microsoft: SQL Server: // mydbComputernameorip: 1433; DatabaseName = Master", SUSR, SPWD);
7. ODBC
Class.Forname ("Sun.jdbc.odbc.jdbcodbcdriver");
Connection CN = DriverManager.getConnection ("JDBC: ODBC:" SDSN, SUSR, SPWD;
8.DB2 (new addition)
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.Microsoft SQL Server Series (6.5, 7.x and 2000) And Sybase 10
JDBC Name: JTDS
URL: http://jtds.sourceforge.net/
Version: 0.5.1
Download URL: http://sourceforge.net/project/showfiles.php?group_id=33291
grammar:
Class.Forname ("Net.SourceForge.jtds.jdbc.driver");
Connection Con = DriverManager.getConnection ("JDBC: JTDS: SQLSERVER: // Host: Port / Database", "User", "Password");
oral
Connection Con = DriverManager.getConnection ("JDBC: JTDS: Sybase: // Host: Port / Database", "User", "Password");
10.PostgreSQL
JDBC Name: PostgreSQL JDBC
URL: http://jdbc.postgresql.org/
Version: 7.3.3 Build 110
Download URL: http://jdbc.postgreSQL.org/download.html
grammar:
Class.Forname ("Org.PostgreSql.driver);
Connection Con = DriverManager.getConnection ("JDBC: PostgreSQL: // Host: Port / Database", "User", "Password");
11. IBM AS400 host in JDBC syntax
Client Access Express with a V4R4 or above
Can be in C: / Program Files / IBM / Client Access / JT400 / LIB
Find the Driver file JT400.zip and change the extension to become JT400.jar
grammar:
Java.sql.driverManager.registerDriver (new com.ibm.as400.access.as400jdbcdriver ());
Class.Forname ("com.ibm.as400.access.as400jdbcconnection);
Con = DriverManager.getConnection ("JDBC: AS400: // IP", "User", "Password");
12.INFORMIX
Class.Forname ("com.informix.jdbc.ifxdriver). NewInstance ();
String URL =
"JDBC: Informix-SQLI: //123.45.67.89: 1533 / TESTDB: InformixServer = MyServer;
User = testuser; password = TestPassword ";
LIB: jdbcdrv.zip Class.Forname ("com.sybase.jdbc.sybdriver) URL =" JDBC: Sybase: TDS: 127.0.0.1: 2638 / asademo ";
SybConnection Connection = (SybConnection) DriverManager.getConnection (URL, "DBA", "SQL");
13.SAP DB
Class.Forname ("com.sap.dbtech.jdbc.driversapdb");
Java.sql.connection connection = java.sql.driverManager.getConnection ("JDBC: SAPDB: //" Host "/" Database_name, user_name, password)
14.interbase
String Url = "JDBC: Interbase: // localhost / e: /testbed/database/employee.gdb";
Class.Forname ("Interbase.IterClient.driver);
// driver d = new interbase.interclient.driver (); / * This will Want the line Above * /
Connection conn = drivermanager.getConnection (URL, "Sysdba", "MasterKey");
15. HSQLDB
URL: http://hsqldb.sourceforge.net/
Driver: org.hsqldb.jdbcdriver
There are 4 types of connection, respectively:
CON-STR: JDBC: HSQLDB.
Con-Str: JDBC: HSQLDB: / Path / TO / THE / DB / DIR
Con-str (http): jdbc: hsqldb: http: // dbsrv
Con-Str (HSQL): JDBC: HSQLDB: HSQL: // DBSRV