-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathConnectivity.java
More file actions
26 lines (23 loc) · 895 Bytes
/
Copy pathConnectivity.java
File metadata and controls
26 lines (23 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package PracticeAtHome;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.Executor;
// This code will allow us to connect to database in any methods needed for the database.
import java.sql.*;
public class Connectivity {
/**
* This is for connecting to the database and printing worked if it worked
*/
public Statement prepareStatement(Statement query) {
return query;
}
public void Url() throws SQLException
{
String url = "jdbc:postgresql://genesisdatabasethesecondcoming.crlaiqpdndku.us-east-2.rds.amazonaws.com:5432/GenesisCreators" ;
Properties props = new Properties();
props.setProperty("user", "GenesisCreators");
props.setProperty("password", "wewillpassthisclass");
Connection conn = DriverManager.getConnection(url, props);
//System.out.println("Worked");
}
}