连接各种数据库的URL和DRIVER
2012-05-13 12:22:16 来源:WEB开发网核心提示: 数据库连接<!-- Mysql --><entry key="jdbc.url">jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8</entry><entry
数据库连接
<!-- 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>
更多精彩
赞助商链接