How i can search to specified record in datbase and display all information of this recored in android
<p>i need to search on name of teacher and display all information about it
when user enter teacher name</p>

<p>I have wirrten this code but its given me run time error
this error is :-
FATAL EXCEPTION: main</p>

<p>this is GetRecord method</p>

<pre><code> public Cursor getRecord(String n1) throws SQLException 
 {
      Cursor mCursor =db.query(true, databaseName, new String[] {facultyc,
                 deparmentc, namec, officeNumberc,Phonec ,emailAddressc,officeHourc},namec + "=" + n1, null, null, null, null, null);
      if (mCursor != null) {
           mCursor.moveToFirst();
      }
      return mCursor;
 }
</code></pre>

<p>and this  search method, its perfom when user click on search button</p>

<p>public void search(){</p>

<pre><code>    db.open();
    Cursor c = db.getRecord(n);
    if (c.moveToFirst()){
        t1.setText(c.getString(0));
        t2.setText(c.getString(1));
        t3.setText(c.getString(2));
        t4.setText(c.getString(3));
        t5.setText(c.getString(4));
        t6.setText(c.getString(5));
        t7.setText(c.getString(6));

    }

    else
        Toast.makeText(this, "this Dr not found", Toast.LENGTH_LONG).show();
    db.close();
}
this arror appear
05-04 13:39:52.856: E/Trace(4001): error opening trace file: No such file or directory (2)
</code></pre>
