java 连数据库的基本参数

 

 

microsoft 驱动

final String DRIVER = "com.microsoft.jdbc.sqlserver.SQLServerDriver";

final tring URL = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=manager";

final String USERNAME = "sa";

final String PASSWORD = "";

 

 

[/color] sum 驱动:

driver =sun.jdbc.odbc.JdbcOdbcDriver();

url ="jdbc:odbc:mysql";

con =DriverManager.getConnection(url,"sa","");

用sun 要在电脑上建数据源

你可能感兴趣的:(java,mysql,jdbc,Microsoft,sun)