[Solved] no such table: main.course_name

[ad_1] Unfortunately i did not write any query to create the above table causing the error. Assuming that you really meant to say i did not write any query to use the above table; you did implicitly by defining teacher_table table with :- +”FOREIGN KEY(“+courseId+”)”+” REFERENCES “+CourseTable.courseName+”(“+CourseTable.courseID+”)” That is to insert into the teacher_table the … Read more

[Solved] SQLiteOpenHelper.getReadableDatabase() method is crashing

[ad_1] Thank you all…i’ve found the answer….i was calling the getAccountById method from a fragment…so i must re-pass the Context again to it UpdateAccountFragment a = new UpdateAccountFragment(accountID,getActivity()); and the constructor of the UpdateAccountFragment look like public UpdateAccountFragment (int accountID , Context context) { this.context = context; this.accountID = accountID; } 1 [ad_2] solved SQLiteOpenHelper.getReadableDatabase() … Read more

[Solved] I entered the data in slqite database still cursor.getCount() is null and the Error :- Invalid tables

[ad_1] A cursor allows you to access the query result set. The query result set does not change if you insert new data after querying. Hence the cursor count stays at 0. You need to query your database again to see the new data. The NPE seen as warning in your System.err log is not … Read more