Vendor URL Formats : Connection « Database « Java Tutorial






Vendor                   Driver Name                                      URL Sample

Oracle 8i                oracle.jdbc.driver.OracleDriver                  jdbc:oracle:thin:@localhost:1521:yourDatabase

Oracle 9i                oracle.jdbc.driver.OracleDriver                  jdbc:oracle:thin:@localhost:1521:yourDatabase

MySQL                    org.gjt.mm.mysql.Driver                          jdbc:mysql://localhost/yourDatabase

Microsoft Access         sun.jdbc.odbc.JdbcOdbcDriver                     jdbc:odbc:scorpian


Sybase(jConnect 5.2)     com.sybase.jdbc2.jdbc.SybDriver                  jdbc:sybase:Tds:scorpian:2638


MS SQL Server 2000       com.microsoft.jdbc. sqlserver.SQLServerDriver    jdbc:microsoft:sqlserver://localhost:1433

MS SQL Server 2000       weblogic.jdbc.mssqlserver4.Driver                jdbc:weblogic:mssqlserver4:database@ localhost:port

IBM DB2                  COM.ibm.db2.jdbc.net.DB2Connection               jdbc:db2://localhost:6789/yourDatabase








20.3.Connection
20.3.1.Connection Object
20.3.2.Connection Object Requirements
20.3.3.Connection Properties: Pass additional properties using java.util.Properties:
20.3.4.Passing 'user' and 'password' Parameters as a java.util.Properties Object to Connection object
20.3.5.Test to See if Your Connection is Alive
20.3.6.Vendor URL Formats
20.3.7.Connection's Method to Print Native SQL