title: Screen freezes and the app quit
body: <p>I'm trying to send some info to my mysql db after clicking on a button but my screen freezes and then it quit.
  Here is the code:</p>
  
  <pre><code>    b1.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) 
          {
              try
              {
                  new SendInfo(email.getText().toString(),password.getText().toString());
              }catch(Exception e){
                  error.setText((CharSequence) e);
              }
  
          }
      });
  </code></pre>
  
  <p>and here is the SendInfo class:</p>
  
  <pre><code>public SendInfo(String email, String pass) throws Exception
  {
      Connection conn = null;
      String url = "jdbc:mysql://ip...:3306/"; // info changed
      String dbName = "db"; //info changed
      String driver = "com.mysql.jdbc.Driver";
      String userName = "user"; //info changed
      String password = "pass"; //info changed
      String table = "users";
  
      Class.forName(driver).newInstance();
      DriverManager.setLoginTimeout(100);
      conn = DriverManager.getConnection(url+dbName,userName,password);
  
      Statement st = conn.createStatement();
      java.util.Calendar cal = java.util.Calendar.getInstance();
      java.util.Date utilDate = cal.getTime();
      java.sql.Date sqlDate = new Date(utilDate.getTime());
  
      st.executeUpdate("INSERT INTO users VALUES('1','Komal','asd',"+sqlDate+")");
      conn.close();
  
  }
  </code></pre>
  
  <p>I didn't even used the values I get as parameters to make it easier but it's still not working.</p>