private void ConnectionButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ConnectionButtonActionPerformed
        try {
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            Connection con = DriverManager.getConnection("jdbc:odbc:VideoStore", "", "");
            Statement stat = con.createStatement();
            String query = new String(UserPasswordField.getPassword());
            ResultSet results = stat.executeQuery("SELECT * FROM Users "
                                                + "WHERE user_name = '" + UserNameTextField.getText() + "' AND password = '"
                                                + query + "'");
            if (!results.next()) {
                JOptionPane.showMessageDialog(null, "Incorrect password entered. Please try again.", 
                        "Incorrect Password", 0);
            } else {
                DiscconectionButton.setEnabled(true);
                ConnectionButton.setEnabled(false);
                try {
                    serverSock = new ServerSocket(6666);
                    listening = true;
                    JOptionPane.showMessageDialog(null, "Server started successfully", "Server started", 1);
                    ServerLabel.setText("The Server : is up and running");
                } catch (IOException e) {
                    System.out.println(e.toString());
                }
            }
            
            if (runner == null) {
                runner = new Thread(this);
                runner.start();
            }
            
            stat.close();
        } catch (SQLException e) {
            JOptionPane.showMessageDialog(null, e, "Error Message", 0);
        } catch (ClassNotFoundException e) {
            JOptionPane.showMessageDialog(null, e, "Error Message", 0);
        }
    }//GEN-LAST:event_ConnectionButtonActionPerformed