Press "Enter" to skip to content

Connection code of resturant management system.

What is database ?

A database is a group of statistics that is organized in order that it could be effortlessly accessed, controlled and up to date. Computer databases typically include aggregations of statistics statistics or documents, containing facts about income transactions or interactions with particular clients.

Video of resturant management system.

Source code for connection of the project with database.

public class Connect {
Connection con = null;

public static Connection dbConnect(){
try{
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/restaurant","root","");
return con;
}catch(ClassNotFoundException | SQLException e){
JOptionPane.showMessageDialog(null, e);
return null;
}
}
}

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *