Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package DBConnection;
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.SQLException;
- /**
- *
- * @author piec
- */
- public class dbc {
- public Connection connection = null;
- public Connection getConnection() throws SQLException {
- String dbname = "bazakina";
- String userName = "root";
- String password = "";
- System.out.println("Driver");
- connection = DriverManager.getConnection("jdbc:mysql://localhost/" + dbname, userName, password);
- System.out.println("połączenie");
- return connection;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement