private class UploadFilesTask extends AsyncTask<Object, Object, Object> {
@Override
protected Object doInBackground(Object... arg0) {
SQLiteDatabase db = dbs.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(DBAdapter.KG_ID, "q");
values.put(DBAdapter.KG_Used, "False");
values.put(DBAdapter.KG_UsedDate, "");
db.insert(DBAdapter.KG_ThisPDAIncidentIDPreAllocations, null, values);
In my application as soon as the code hits the line SQLiteDatabase db = dbs.getWritableDatabase(); i get an error. Can a database be accessed in a AsynTask? It is in a separate service class.
dbs.getWritableDatabase().adb logcat? Also, you will need to include the source for the method you are calling that is failing if you want to get any help.