Connecting JSP Project with MYSQL in Tamil | Java | DinaTechy
In this video, we are making an connection between JSP Project with MYSQL
Here is the code :
Class.forName(“com.mysql.jdbc.Driver”);
Connection con = DriverManager.getConnection(
“jdbc:mysql://127.0.0.1:3306/dbname”,
“username”,”password”);
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(“select * from employee”);
while(rs.next()) {
System.out.println(rs.getInt(1)+” “+rs.getString(2)+” “+
rs.getString(3));
}
con.close();
Thanks for watching the video Guys.
Like and Share Guys.
Subscribe and Support Guys.