回答編集履歴
4
例外の修正
test
CHANGED
@@ -96,7 +96,7 @@
|
|
96
96
|
|
97
97
|
|
98
98
|
|
99
|
-
} catch (Exception e) {
|
99
|
+
} catch (SQLException e) {
|
100
100
|
|
101
101
|
e.printStackTrace();
|
102
102
|
|
3
コードを少しだけ分かりやすいように修正
test
CHANGED
@@ -86,11 +86,11 @@
|
|
86
86
|
|
87
87
|
try {
|
88
88
|
|
89
|
-
connection =
|
89
|
+
Connection connection = Dbtest.getConnection();
|
90
90
|
|
91
|
-
Statement = connection.
|
91
|
+
Statement statement = connection.statement("");
|
92
92
|
|
93
|
-
resultSet =
|
93
|
+
ResultSet resultSet = statement.executeQuery();
|
94
94
|
|
95
95
|
|
96
96
|
|
@@ -102,11 +102,11 @@
|
|
102
102
|
|
103
103
|
} finally {
|
104
104
|
|
105
|
-
|
105
|
+
Dbtest.close(resultSet);
|
106
106
|
|
107
|
-
|
107
|
+
Dbtest.close(statement);
|
108
108
|
|
109
|
-
|
109
|
+
Dbtest.close(connection);
|
110
110
|
|
111
111
|
}
|
112
112
|
|
2
プログラムの修正
test
CHANGED
@@ -92,8 +92,6 @@
|
|
92
92
|
|
93
93
|
resultSet = Statement.executeQuery();
|
94
94
|
|
95
|
-
resultSet.next();
|
96
|
-
|
97
95
|
|
98
96
|
|
99
97
|
|
1
表記漏れの修正
test
CHANGED
@@ -80,7 +80,7 @@
|
|
80
80
|
|
81
81
|
|
82
82
|
|
83
|
-
あとは下記コードの様に呼び出します。
|
83
|
+
あとはSimpleCode内で下記コードの様に呼び出します。
|
84
84
|
|
85
85
|
```java
|
86
86
|
|