title: get value from prepared statement query android?
body: <p>i have a doubt that how to get the result of the prepared statement query in android.Actually i have a need that i want the row id from database while comparing a field words which can contain ' or" so i want to use prepared statement ,after googling out i did not get any proper example for android sqlite database ,please tell me how to use the prepared statement in android and after running query ,how to use value either through result set or through cursor.below is query look like-</p>
  
  <pre><code>String perfect_stmnt="select ID from Annotation where   HighlightedWord=? ";
  
          try{
              ** Connection con=DriverManager.getConnection("file:/"+ db.getPath());**
              pstmt = con.prepareStatement(perfect_stmnt);
  
  
              pstmt.setString(1, highlightword);
  
  
              Resultset rs = pstmt.executeQuery();  
  </code></pre>
  
  <p>Here the major doubt i am having how to get the connection here see the line having **</p>
  
  <p>Thanks</p>