Answers for "duplicate data found in servlet"

0

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);
Posted by: Guest on May-11-2020

Code answers related to "duplicate data found in servlet"

Browse Popular Code Answers by Language