title: How to add multiple rows in database in android?
body: <p>I am developing an android application where i need to enter multiple rows in database at a one go,
  i have 18 rows and 4 columns in my user interface which are edit texts , is it possible to enter all data i data base with one button click , how can i do that ?
  Here is my code to generate one row </p>
  
  <pre><code>public void addRow(String rowStringOne, String rowStringTwo)
  {
  // this is a key value pair holder used by android's SQLite functions
  ContentValues values = new ContentValues();
  values.put(TABLE_ROW_ONE, rowStringOne);
  values.put(TABLE_ROW_TWO, rowStringTwo);
  
  // ask the database object to insert the new data
  try{db.insert(TABLE_NAME, null, values);}
  catch(Exception e)
  {
  Log.e("DB ERROR", e.toString());
  e.printStackTrace();
  }
  }
  </code></pre>