bug fix

parent c48f9266
...@@ -16,8 +16,6 @@ public class StudentDao { ...@@ -16,8 +16,6 @@ public class StudentDao {
ps.setInt(3,e.getAge()); ps.setInt(3,e.getAge());
status=ps.executeUpdate(); status=ps.executeUpdate();
con.close();
con.isClosed()
}catch(Exception ex){ex.getMessage();} }catch(Exception ex){ex.getMessage();}
return status; return status;
......
...@@ -7,9 +7,6 @@ public class UtilityDao { ...@@ -7,9 +7,6 @@ public class UtilityDao {
public static Connection getConnection(){ public static Connection getConnection(){
Connection con=null; Connection con=null;
if(Connection.){
}
try{ try{
Class.forName("com.mysql.cj.jdbc.Driver"); Class.forName("com.mysql.cj.jdbc.Driver");
con= DriverManager.getConnection("jdbc:mysql://localhost:3306/mydb","root","root1234"); // con= DriverManager.getConnection("jdbc:mysql://localhost:3306/mydb","root","root1234"); //
......
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