Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import JDBC.JDBCOperations;
- import java.sql.Connection;
- public class Main {
- public static void main(String argv[]) {
- if (argv.length != 3) {
- System.out.println("Invalid arguments!");
- } else {
- String url = argv[0];
- String user = argv[1];
- String password = argv[2];
- Connection connection = JDBCOperations.createConnection(url, user, password);
- if (connection == null) {
- System.out.println("Invalid Url, Username or Password!");
- } else {
- JDBCOperations.dropTables(connection);
- JDBCOperations.createTables(connection);
- JDBCOperations.fillTables(connection);
- JDBCOperations.executeOperations(connection);
- JDBCOperations.closeConnection(connection);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement