Android : no such a table
<p>i try to get some values from database but i get no such a table <code>student</code> error.</p>

<p>I have this DBAdapter class</p>

<pre><code>public class DBAdapter {
    private static final String TAG = "DBAdapter";
    private DatabaseHelper DBHelper;
    private SQLiteDatabase db;
    private final Context context;

    public static final String KEY_ROWID = "_id";
    public static final int KEY_STUDENTSID = 0;
    public static final String KEY_NAME = "name";
    public static final String KEY_SURNAME = "surname";
    public static final int KEY_MIDTERM = 0;
    public static final int KEY_PROJECT = 0;
    public static final int KEY_FINAL = 0;


    private static final String DATABASE_NAME = "studentDB";
    private static final String DATABASE_TABLE = "student";
    private static final int DATABASE_VERSION = 2;

    // Constructor
    public DBAdapter(Context ctx) {
        this.context = ctx;
        DBHelper = new DatabaseHelper(context);
    }

    // To create and upgrade a database in an Android application
    // SQLiteOpenHelper subclass is usually created
    private static class DatabaseHelper extends SQLiteOpenHelper {
        DatabaseHelper(Context context) {
            super(context, DATABASE_NAME, null, DATABASE_VERSION);
        }

        @Override
        public void onCreate(SQLiteDatabase db) {

        }

        @Override
        public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
            // Sends a Warn log message
            Log.w(TAG, "Upgrading database from version " + oldVersion + " to "
                    + newVersion + ", which will destroy all old data");

            // Method to execute an SQL statement directly
            db.execSQL("DROP TABLE IF EXISTS student");
            onCreate(db);
        }
    }

    // Opens the database
    public DBAdapter open() throws SQLException {
        // Create and/or open a database that will be used for reading only
        db = DBHelper.getReadableDatabase();
        return this;
    }

    // Closes the database
    public void close() {
        // Closes the database
        DBHelper.close();
    }

    public Cursor getNameSurname(String name) throws SQLException {
        if (name.toString().equals("*")) {
            return db.query(DATABASE_TABLE, new String[] { KEY_NAME,
                    KEY_SURNAME }, null, null, null, null, null);
        } else {

            return db.query(true, DATABASE_TABLE, new String[] { KEY_NAME,
                    KEY_SURNAME }, KEY_NAME + "='" + name + "'", null, null,
                    null, null, null);
        }

    }

}
</code></pre>

<p>I try to get values with this class. I put my studentDB db into the asset. What is wrong with that code? What do i missing?What do i missing? what is wrong?what is wrong?</p>

<p><strong>I opened DDMS and find databases folder. There is my db studentDB and export it to my desktop and opened it. There was no my table <code>student</code> why?</strong></p>
