inserting multiple row at time in sqlite
<p>I just created a method to insert into the database. But it still showing the same result. i,e unit1 only. the code is as follows
DbAdapter.java</p>

<pre><code>private static final String DATABASE_NAME="bible1";
 private static final String DATABASE_TABLE="test1";
 private static final int DATABASE_VERSION=1;

 public static final String KEY_ID="_id";
 public static final String UNITS="units";
 public static final String CHAPTERS="chapters";

 private static final String CREATE_DATABASE="create table test1 (_id integer primary key autoincrement, units text not null, chapters text not null);";

 private static SQLiteHelper sqLiteHelper;
 private static SQLiteDatabase sqLiteDatabase;

 private Context context;

 //constructor

 public DbAdapter(Context c){
     context = c;
 }

 private static class SQLiteHelper extends SQLiteOpenHelper{

     public SQLiteHelper(Context context){

         super(context,DATABASE_NAME,null,DATABASE_VERSION);
     }
     @Override
     public void onCreate(SQLiteDatabase db) {
         // TODO Auto-generated method stub
         db.execSQL(CREATE_DATABASE);
         MakeUnits();
     }

     @Override
     public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
         // TODO Auto-generated method stub

     }

 }

 public DbAdapter open() throws SQLException{
     try{
     sqLiteHelper = new SQLiteHelper(context);
     sqLiteDatabase = sqLiteHelper.getWritableDatabase();
     }catch(NullPointerException ne){
         Log.e("Database", "error in creating the table");
     }

     return this;
 }

 public void close(){
     sqLiteHelper.close();
 }

 public static void MakeUnits()
 {
     createUnits("unit1","chapter1");
     createUnits("unit2","chapter2");  
 }

 public Cursor fetchAllNotes(){
     return sqLiteDatabase.query(DATABASE_TABLE, new String[]{KEY_ID,UNITS,CHAPTERS}, null, null, null, null, null);
 }

 public static long createUnits(String units,String chapters){
     ContentValues content= new ContentValues();
     content.put(UNITS, units);
     content.put(CHAPTERS, chapters);
     return sqLiteDatabase.insert(DATABASE_NAME, null, content);

 }
</code></pre>

<p>So What to do now? I think the method I created is correct.</p>
