//SQL_Server:
String driver = “com.microsoft.jdbc.sqlserver.SQLServerDriver”;
String url = “jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=test”;
String user = “sa”;
String password = “”;
//oracle:
String driver = “oracle.jdbc.driver.OracleDriver”;
String url = “jdbc:oracle:thin:@localhost:1521:wanchao”;
http://www.gaodaima.com/41642.htmlsqlserver,oracle,mysql数据库的直连的
String user = “scott”;
String password = “tiger”;
//mysql
String driver=”com.mysql.jdbc.Driver”;
String url=”jdbc:mysql://localhost:3306/chinabank?useUnicode=true&characterEncoding=GBK”;
String user=”root”;
String passeord=”root”;
Class.forName(driver);
con = DriverManager.getConnection(url,user,password);
欢迎大家阅读《sqlserver,oracle,mysql数据库的直连的》,跪求各位点评,若觉得好的话请收藏本文,by 搞代码