JDBC driver summary

zhaozj2021-02-16  79

JDBC driver summary - from 9CBS keyword JDBC

Many editions are often asked for JDBC Driver or how to use Driver (also including me yourself), here I simply organize the relatively representative Driver and how to use

JDBC driver summary - from 9CBS keyword JDBC

In view of many editions to find JDBC Driver or how to use Driver often ask, I will simply organize representative Driver and how to use.

Microsoft SQL Server Series (6.5, 7.x and 2000) and Sybase 10

JDBC Name: htdsurl: http://jtds.sourceforge.net/Version: 0.5.1download 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"); Orconnection Con = DriverManager.getConnection ("JDBC: JTDS: Sybase: // Host: Port / Database", "User", "Password");

Mysql

JDBC Name: Connector / J 3.0URL: http://www.mysql.com/version: 3.0.8-stabledownload url: http://www.mysql.com/downloads/api-jdbc-stable.html

grammar:

Class.Forname ("com.mysql.jdbc.driver); Connection Con = DriverManager.getConnection (" JDBC: MySQL: // Host: Port / Database "," User "," Password ");

Oracle

JDBC Name: Connector / J 3.0URL: http://otn.oracle.com/Version: 3.0.8-stabledownload url: http://otn.racle.com/software/tech/java/sqlj_jdbc/content.html

grammar:

Class.Forname ("Oracle.jdbc.driver.OracleDriver"); Connection Con = DriverManager.getConnection ("JDBC: Oracle: Thin: @Host: Port: Database", "User", "password");

Sybase

Driver: JConnect 4.5 / 5.5 (JDBC 2.0 Please use 5.5)

grammar:

Class.Forname ("com.sybase.jdbc2.jdbc.sybdriver"). NewInstance (); DriverManager.getConnection ("JDBC: Sybase: TDS: IP Address: 2638? Services =" Database Name, "Account", "Password ");

PostgreSQL

JDBC Name: postgreSQL JDBCURL: http://jdbc.postgreSQL.ORG/Version: 7.3.3 Build 110Download URL: http://jdbc.postgreSQL.org/download.html Syntax:

Class.Forname ("Org.PostgreSql.driver); Connection Con = DriverManager.getConnection (" JDBC: PostgreSQL: // Host: Port / Database "," User "," Password ");

JDBC syntax for IBM AS400 host

Client Access Express, which is available, V4R4, can find Driver file JT400.zip in C: / Program Files / IBM / Client Access / JT400 / Lib, 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 ");

转载请注明原文地址:https://www.9cbs.com/read-14659.html

New Post(0)