This commit is contained in:
Gregor_Dutzler
2019-10-04 16:52:14 +02:00
parent 54aa35563b
commit 6b8cb9cc10
12 changed files with 174 additions and 22 deletions

View File

@ -7,7 +7,8 @@ import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.Vector;
public abstract class Database {
public abstract class
Database {
protected String user;
protected String password;

View File

@ -12,18 +12,18 @@ import java.sql.SQLException;
public class jdcb {
Connection conn;
public jdcb(String username, String password, String dbName) {
public jdcb(String username, String password,String dbname) {
Database db = new MySQLConnector(
username,
password,
"192.168.65.15",
3306,
dbName);
dbname);
try {
conn = db.getConnection();
} catch (SQLException e) {
Log.error("no connection to Database! DB Server not started...?");
Log.error("no connection to Database!");
}
}
@ -32,7 +32,6 @@ Connection conn;
try {
PreparedStatement stmt = conn.prepareStatement(sql);
return stmt.executeQuery();
} catch (SQLException e) {
e.printStackTrace();