DriverManager.registerDriver(new com.microsoft.sqlserver.jdbc.SQLServerDriver()); Connection c = DriverManager.getConnection( "jdbc:sqlserver://localhost:1433;databaseName=Catalog", "user", "pass");Driver: sqljdbc.jar
MySQL
Class.forName("com.mysql.jdbc.Driver"); Connection c = DriverManager.getConnection( "jdbc:mysql://localhost/databaseName","user","pass");Driver: mysql-connector-java.jar
No hay comentarios:
Publicar un comentario