title: Android sqlite rollback
body: <p>I am doing database syn. Downloading data between sql server and sqlite.If there some circumstance while updating/inserting records in sqlite ,internet connectivity is slow or drop then need to roll back.Is it possible in this code or How to use Transaction here.</p>
  
  <pre><code> public void insertTableRecords(String strTableName, String[] strToFields, String[] strValues){
      DBAdapter dbAdapter = DBAdapter.getDBAdapterInstance(DownlaodTableActivity.this);
      dbAdapter.openDataBase();
      ContentValues initialValues = new ContentValues();
      for(int i=0 ;i&lt;strToFields.length;i++){
          initialValues.put(strToFields[i],strValues[i]);
      }
      long n = dbAdapter.insertRecordsInDB(strTableName, null, initialValues);
      System.out.println( " -- inserted status : --- " + n);
  }
  </code></pre>
  
  <p>Please help me.</p>
  
  <p>Thanks in advance...</p>