duplicate data found in servlet code example
Example: duplicate data found in servlet
{
String userName = request.getParameter("uname");
String contact = request.getParameter("contact");
//code for DB Connection
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection con = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;databasename=sushil;user=sa; password=MultiMetal");
Statement st = con.createStatement();
st.executeUpdate("insert into tblUser (UserName, Contact) values('" + userName + "','" + contact + "')");
request.getRequestDispatcher("Welcome.html").forward(request, response);