Advertisement

Udemy WW Udemy WW

Wednesday, 30 November 2011

Jdbc Connection URL with different Data base

for MS Access
Type 1
driver-sun.jdbc.odbc.JdbcOdbcDriver
con url-jdbc:odbc:dataSourceName
for Oracle 10 G
type 4
driver-oracle.jdbc.driver.OracleDriver [need ojdbc14.jar file]
conn-url:
DriverManager.getConnection(
"jdbc:oracle:thin:@IPadd:1521:ServiceID","user","password")
for MySql
driver:    {set classpath for mysql-connector-java-5.0.7-bin.jar}

com.mysql.jdbc.Driver
 
conn-url
 
con = DriverManager.getConnection(
        "jdbc:mysql://IPadd:port/DBname?"
        + "user=ohm&password=java"); 
 
for MS SQL Server 2008
 
driver:
{need sqljdbc.jar in class path } 
com.microsoft.sqlserver.jdbc.SQLServerDriver 
conn-url:
  • URL: jdbc:sqlserver://server:port;DatabaseName=dbname

2 comments:

  1. Thanks for sharing useful post about Jdbc connection URL with different Data base.

    Keep it up :)

    ReplyDelete
  2. Everything is very open with a precise explanation of the challenges.
    It was definitely informative. Your website is very useful.
    Many thanks for sharing!

    ReplyDelete

Advertisement

Udemy WW