The java API says that newInstance() creates a new instance from an already existing object of this class. ![]() RequestDispatcher rd = request.getRequestDispatcher("changePassAdmin. All the docs give this statement for registering the driver: Class.forName('').newInstance() and I dont understand why the newInstance() method is necessary. RequestDispatcher rd = request.getRequestDispatcher("index.html") Out.println("Account successfully created!") ![]() ![]() PreparedStatement ps = con.prepareStatement("INSERT INTO payroll_system.employee_info(employeeID, FirstName, LastName, Admin,DOB,Address,Email,HourlyRate,Gender,ALeaveBalance,SLeaveBalance,ActiveStatus,Role,BSB,BankName,AccNumber,SuperNumber,SuperCompany) values(?,?,?,?,?,?,?,?,?,?,?,1,?,?,?,?,?,?)") Class.forName("").newInstance() Ĭonnection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/payroll_system", "root", "")
0 Comments
Leave a Reply. |