What is wrong with my Syntax here? (SQLite) : <p>Well I make some changes in my Table  and now is showing me this error. I am try to Debug but with no luck. Any idea?</p>

<p>"android.database.sqlite.SQLiteException: no such table: tablename (code 1): , while compiling: select * from tablename"</p>

<pre><code>      import java.util.ArrayList;
        import java.util.HashMap;
        import java.util.Hashtable;
        import android.content.ContentValues;
        import android.content.Context;
        import android.database.Cursor;
        import android.database.DatabaseUtils;
        import android.database.sqlite.SQLiteOpenHelper;
        import android.database.sqlite.SQLiteDatabase;

public class DBHelper extends SQLiteOpenHelper {

    public static final String DATABASE_NAME = "MyDBName.db";
    public static final String CONT_TABLE_NAME = "tablename";
    public static final String CONT_COLUMN_ID = "id";
    public static final String CONT_COLUMN_CONDUCTIVITY = "conductivity";
    public static final String CONT_COLUMN_MOISTURE = "moisture";
    public static final String CONT_COLUMN_OXYGEN = "oxygen";
    public static final String CONT_COLUMN_PH = "ph";

    private HashMap hp;

    public DBHelper(Context context)
    {
        super(context, DATABASE_NAME , null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        // TODO Auto-generated method stub
        db.execSQL(
                "create table tablename " +
                        "(id integer primary key, conductivity text,ph text,oxygen text, moisture text)"
        );
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        // TODO Auto-generated method stub
        db.execSQL("DROP TABLE IF EXISTS tablename");
        onCreate(db);
    }

    public boolean insertContact  (String conductivity, String ph, String oxygen, String moisture)
    {
        SQLiteDatabase db = this.getWritableDatabase();
        ContentValues contentValues = new ContentValues();
        contentValues.put("conductivity", conductivity);
        contentValues.put("ph", ph);
        contentValues.put("oxygen", oxygen);
        contentValues.put("moisture", moisture);

        db.insert("tablename", null, contentValues);
        return true;
    }

    public Cursor getData(int id){
        SQLiteDatabase db = this.getReadableDatabase();
        Cursor res =  db.rawQuery( "select * from tablename where id="+id+"", null );
        return res;
    }

    public int numberOfRows(){
        SQLiteDatabase db = this.getReadableDatabase();
        int numRows = (int) DatabaseUtils.queryNumEntries(db, CONT_TABLE_NAME);
        return numRows;
    }

    public boolean updateContact (Integer id, String conductivity, String ph, String oxygen, String moisture)
    {
        SQLiteDatabase db = this.getWritableDatabase();
        ContentValues contentValues = new ContentValues();
        contentValues.put("conductivity", conductivity);
        contentValues.put("ph", ph);
        contentValues.put("oxygen", oxygen);
        contentValues.put("moisture", moisture);

        db.update("tablename", contentValues, "id = ? ", new String[] { Integer.toString(id) } );
        return true;
    }

    public Integer deleteContact (Integer id)
    {
        SQLiteDatabase db = this.getWritableDatabase();
        return db.delete("tablename",
                "id = ? ",
                new String[] { Integer.toString(id) });
    }

    public ArrayList&lt;String&gt; getAllCotacts()
    {
        ArrayList&lt;String&gt; array_list = new ArrayList&lt;String&gt;();

        //hp = new HashMap();
        SQLiteDatabase db = this.getReadableDatabase();
        Cursor res =  db.rawQuery( "select * from tablename", null );
        res.moveToFirst();

        while(res.isAfterLast() == false){
            array_list.add(res.getString(res.getColumnIndex(CONT_COLUMN_CONDUCTIVITY)));
            res.moveToNext();
        }
        return array_list;
    }
}
</code></pre>
