can not Insert more than one records in sqlite database
<p>I insert data into sqlite database table and when i insert first record , it is inserted successfully , but the second and all next records are not inserted. here is my database helper class.
i have tried the same queries in sqlite manager in firefox and they work fine. I can not get any idea why they are not working in my code.</p>

<pre><code>    private static final String DATABASE_CREATE = "create table " + DATABASE_TABLE + "( " + KEY_ROWID +
        " INTEGER PRIMARY KEY AUTOINCREMENT, " + KEY_DESCRIPTION + " text, "+ KEY_WHY+" text , "+ KEY_ACCOUNTABILITY+
        " text , "+KEY_ALARM_TYPE+" text , "+KEY_ALARM_VOLUME+" text,  "+KEY_BG_IMAGE+" text, "+KEY_CATEGORY+"  text, "+KEY_DATE_TIME+  " datetime "+" , "+KEY_STATUS+" text );";
    public void addRecord(String description,String why, String accontability, String alarm_type,
            String alarm_vol, String bg_image, String category, Date goalDateTime,String status) {
        String query = "INSERT INTO " + DATABASE_TABLE + " VALUES(null,'"+ description + "', '" + why +  "', '" + accontability +"','" + alarm_type +
                "', '" + alarm_vol +  "', '" + bg_image +"','" +category+ "','" +  goalDateTime +"','"+status+"');";
        Log.v("---&gt;", query);
        try{
        mDB.execSQL(query);



    } catch (Exception ex) {
        Log.v("database error", ex.toString());

    }
    }
</code></pre>

<p>here i am adding data in table</p>

<pre><code>    try {
        /*
         * dbHelper = new GoalDbAdapter(this); dbHelper.open();
         * Log.v("database ","database opened"); // dbHelper. fillData();
         */
        db = new GoalDbAdapter(this);
        db.open();
        String imagePath = pref.getValue("imagePath", "");
        String goalCateg = pref.getValue("categText", "");
        String vol = pref.getValue("vol", "");
        String alarmType=  pref.getValue("ringTonePath", "");
        db.addRecord(goal_desc, goal_why, accountability, alarmType, vol, imagePath, goalCateg, goalDate,"");
         cursor = db.getTop3Goals();
        Log.v("cursor count in add act",".."+cursor.getCount());
        cursor.close();
        db.close();
    } catch (Exception ex) {
        Log.v("database error", ex.toString());

    }
</code></pre>

<p>Here is my code to get goals , i am unable to fetch all data , it returns only the first goal and not others. All these methods are returning only the first goal.</p>

<pre><code>     public Cursor getGoals() {
    Cursor c_all = mDB.rawQuery("SELECT * FROM " + DATABASE_TABLE, null);
    int count= c_all.getCount();
    Log.v("cursor count in db all goals", c_all.getCount()+"..");
    c_all.moveToFirst();
    return c_all;
}

//SELECT * FROM table ORDER BY date DESC LIMIT 5

public Cursor getTop3Goals() {
    Cursor c = mDB.rawQuery("SELECT * FROM " + DATABASE_TABLE + " ORDER BY "+ KEY_DATE_TIME + " DESC LIMIT 3", null);
    c.moveToFirst();
    return c;
}

public Cursor getGoalsByDate() {
    Cursor c = mDB.rawQuery("SELECT * FROM " + DATABASE_TABLE + " ORDER BY "+ KEY_DATE_TIME + " DESC ", null);
    c.moveToFirst();
    return c;
}
</code></pre>
