1. 程式人生 > >java連線各種資料庫的寫法

java連線各種資料庫的寫法


JDBC Name: jTDS
Home Page: http://jtds.sourceforge.net/
JDBC Ver: 1.0.2
Download: http://sourceforge.net/project/showfiles.php?group_id=33291
Conn Code:
  Class.forName("net.sourceforge.jtds.jdbc.Driver ");
  Connection con = DriverManager.getConnection("jdbc:jtds:sqlserver://host:port/database","user","password");
or
  Connection con = DriverManager.getConnection("jdbc:jtds:sybase://host:port/database","user","password");