0
Java 응용 프로그램의 컨트롤러 클래스에 새 데이터베이스를 만드는 방법을 보여줄 수 있습니까? 예를 들어, 나는 데이터베이스에 연결하고 설정을 저장 할 수 있어요 -Java 응용 프로그램의 컨트롤러 클래스에 새 데이터베이스 만들기
private void saveProps() {
if (dbTypeComboBox.getSelectedItem().toString().contains("racle")) {
this.dbprops.setTypeDB(DBType.ORACLE);
} else if (dbTypeComboBox.getSelectedItem().toString().toLowerCase().contains("ysql")){
this.dbprops.setTypeDB(DBType.MySQL);
}else{
this.dbprops.setTypeDB(DBType.SYBASE);
}
this.dbprops.setHostName(hostTF.getText());
this.dbprops.setPort(portTF.getText());
this.dbprops.setUser(userTF.getText());
this.dbprops.setPass(passwordTF.getText());
this.dbprops.setDbDriver(dbDriverTF.getText());
try {
this.dbprops.setConnection_Timeout(Integer.parseInt(timeOutTF.getText()));
} catch (Exception ex) {
this.dbprops.setConnection_Timeout(10);
}
this.dbprops.setSIDOracle(sidTF.getText());
this.dbprops.setPrefixUserOracle(prefixUserTF.getText());
}
하지만, 만들기, 편집 또는보기 컨트롤러 아키텍처의 컨트롤러 클래스의 DB를 삭제하는 방법이 필요합니다.
감사합니다.
스택 오버플로가 아니라 스택 튜토리얼이 필요합니다. – Mohayemin