title: getTitle EditText and Database cursor
body: <p>I am using an <code>EditText</code> as a search field and trying to get the users input from there read into my Cursor. My code crashes because editText shows as an <code>int</code> and not a <code>long</code>. </p>
  
  <p>If I manually input a number it works and system does not crash. What am I doing wrong in converting <code>int</code> into <code>long</code>?</p>
  
  <p>This is my code:</p>
  
  <pre><code>DBAdapter db = new DBAdapter(this);
  db.open();
  EditText edit = (EditText) findViewById(R.id.edit1); 
  String s = edit.getText().toString();
  long n = Integer.parseInt(s); 
  Cursor c = db.getTitle(n);
  if (c.moveToFirst())
      DisplayTitle(c);
  </code></pre>
  
  <p>This code works but I have to input manually the position for <code>getTitle</code>:</p>
  
  <pre><code>DBAdapter db = new DBAdapter(this);
  db.open();
  Cursor c = db.getTitle(6);
  if (c.moveToFirst())
      DisplayTitle(c);
  </code></pre>
  
  <p>Please help.</p>