WEB开发网
开发学院软件开发Java 连接各种数据库的URL和DRIVER 阅读

连接各种数据库的URL和DRIVER

 2012-05-13 12:22:16 来源:WEB开发网   
核心提示:Java代码<!-- Mysql --><entry key="jdbc.url">jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8</entry><entry
Java代码

<!-- Mysql -->
	<entry key="jdbc.url">jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8</entry>
	<entry key="jdbc.driver">com.mysql.jdbc.Driver</entry>

	<!-- Oracle		jdbc:oracle:oci:@tnsname_devdb
	<entry key="jdbc.url">jdbc:oracle:thin:@192.168.0.177:1521:[sid]</entry>
	<entry key="jdbc.driver">oracle.jdbc.driver.OracleDriver</entry>
	-->
	
	<!-- SQLServer2000 
	<entry key="jdbc.url">jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=[database]</entry>
	<entry key="jdbc.driver">com.microsoft.jdbc.sqlserver.SQLServerDriver</entry>
	-->
	
	<!-- SQLServer2005 
	<entry key="jdbc.url">jdbc:sqlserver://192.168.0.98:1433;DatabaseName=[database]</entry>
	<entry key="jdbc.driver">com.microsoft.sqlserver.jdbc.SQLServerDriver</entry>
	-->

	<!-- JTDs for SQLServer 
	<entry key="jdbc.url">jdbc:jtds:sqlserver://192.168.0.102:1433/[database];tds=8.0;lastupdatecount=true</entry>
	<entry key="jdbc.driver">net.sourceforge.jtds.jdbc.Driver</entry>
	-->

	<!-- PostgreSql
	<entry key="jdbc.url">jdbc:postgresql://localhost/[database]</entry>
	<entry key="jdbc.driver">org.postgresql.Driver</entry>
	 -->
	
	<!-- Sybase
	<entry key="jdbc.url">jdbc:sybase:Tds:localhost:5007/[database]</entry>
	<entry key="jdbc.driver">com.sybase.jdbc.SybDriver</entry>
	 -->
	
	<!-- DB2 
	<entry key="jdbc.url">jdbc:db2://localhost:5000/[database]</entry>
	<entry key="jdbc.driver">com.ibm.db2.jdbc.app.DB2Driver</entry>
	-->
	
	<!-- HsqlDB 
	<entry key="jdbc.url">jdbc:hsqldb:mem:generatorDB</entry>
	<entry key="jdbc.driver">org.hsqldb.jdbcDriver</entry>
	-->
	
	<!-- Derby 
	<entry key="jdbc.url">jdbc:derby://localhost/databaseName</entry>
	<entry key="jdbc.driver">org.apache.derby.jdbc.ClientDriver</entry>	
	-->

	<!-- H2 
	<entry key="jdbc.url">jdbc:h2:tcp://localhost/~/test</entry>
	<entry key="jdbc.driver">org.h2.Driver</entry>
	-->

上一页  1 2 3 

Tags:连接 各种 数据库

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接