Commit 303c181b by 陈科朋

bug修改

parent a1dc916f
......@@ -77,7 +77,7 @@ public class DAOClass {
}
public void createConnection(String driver, String db_url, String user, String password) throws SQLException {
if (this.connection == null || this.connection.isClosed() || this.connection.isValid(1)) {
if (this.connection == null || this.connection.isClosed() || !this.connection.isValid(1)) {
try {
Class.forName(driver);
this.connection = DriverManager.getConnection(db_url, user, password);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment