Hi friends
I have been developing a web application in mvc which is in need of using database mysql.
I am suffering from the same problem we are discussing for the following code.
I am collecting the data for the tables from a form.
I had added mysql-connector-java-5.1.17.zip by right clicking the libraries of my project
try
{
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/gopi","root","root");
PreparedStatement pst;
System.out.println("I am creating a connection");
pst= connection.prepareStatement("INSERT into Complaint values(?,?,)");
pst.setString(1,StreetName);
pst.setString(2,Hole_Size);
}
Can anybody help me please.