Re: No drivers for MySQL 8.0.28
Posted by: Chibundu Ugwuegbulem
Date: February 14, 2022 12:31AM

This is my code after adding the jconnector to the class library.


Connection conn = null;
Statement stmt = null;

Class.forName("com.mysql.cj.jdbc.Driver");

//conn = DriverManager.getConnection("jdbc:ucanaccess://C:/Users/Chibundu/Documents/NetBeansProjects/Voting Software/src/electionvotingsoftware.accdb");
conn = (Connection) DriverManager.getConnection("jdbc:mysql80://localhost:3307/electionvotingsoftware", "root", "MYSQLmysql777");
System.out.println("Connected to the database");

stmt = conn.createStatement();
String sql = "INSERT INTO electiondata VALUES('"+partypictures+"','"+partyvotes1+"','"+timevoted+"','"+datevoted+"','"+fingerprint+"','"+fingerprintcode+"','"+votedstatus+"','"+ipaddress+"')";
stmt.executeUpdate(sql);
System.out.println("1 row inserted");
}

Options: ReplyQuote


Subject
Written By
Posted
February 09, 2022 04:21AM
Re: No drivers for MySQL 8.0.28
February 14, 2022 12:31AM
February 18, 2022 03:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.