Hi
ich mache auf meiner App eine Datenbankabfrage aber bekommen imme rim Logcat noch such table found
hier is der code wo ich mir die fragen holen möchte kann mir einer helfen
ich mache auf meiner App eine Datenbankabfrage aber bekommen imme rim Logcat noch such table found
hier is der code wo ich mir die fragen holen möchte kann mir einer helfen
Java:
public List<Question> getQuestionSet(){
List<Question> questionSet = new ArrayList<Question>();
Cursor c = myDataBase.rawQuery("SELECT * FROM QUESTIONS ", null);
while (c.moveToNext()){
//Log.d("QUESTION", "Question Found in DB: " + c.getString(1));
Question q = new Question();
q.setQuestion(c.getString(1));
q.setAnswer(c.getString(2));
q.setChoice1(c.getString(3));
q.setChoice2(c.getString(4));
q.setChoice3(c.getString(5));
questionSet.add(q);
}
return questionSet;
}
Code:
12-27 15:35:43.965: E/AndroidRuntime(21967): FATAL EXCEPTION: main
12-27 15:35:43.965: E/AndroidRuntime(21967): android.database.sqlite.SQLiteException: no such table: QUESTIONS: , while compiling: SELECT * FROM QUESTIONS
12-27 15:35:43.965: E/AndroidRuntime(21967): at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)
12-27 15:35:43.965: E/AndroidRuntime(21967): at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:68)
12-27 15:35:43.965: E/AndroidRuntime(21967): at android.database.sqlite.SQLiteProgram.compileSql(SQLiteProgram.java:143)
12-27 15:35:43.965: E/AndroidRuntime(21967): at android.database.sqlite.SQLiteProgram.compileAndbindAllArgs(SQLiteProgram.java:361)
12-27 15:35:43.965: E/AndroidRuntime(21967): at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:127)
12-27 15:35:43.965: E/AndroidRuntime(21967): at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:94)
12-27 15:35:43.965: E/AndroidRuntime(21967): at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:53)