Я вижу свои таблицы в DB
с этим запросом, ..
(SELECT name
FROM sqlite_master
WHERE type ='table' AND name NOT LIKE 'sqlite_%';)
после (Удаление всей моей таблицы) Я не могу создать таблицу, ...
package com.ariaz.amirmkaa.litner002;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
public class DatabaseManager extends SQLiteOpenHelper {
public DatabaseManager(Context context)
{
super(context, "myDB", null, 1);
}
@Override
public void onCreate(SQLiteDatabase db) {
// TODO Auto-generated method stub
String card_tbl = "CREATE TABLE \"cards_tbl\" (\n" +
"\t\"id\"\tINTEGER NOT NULL,\n" +
"\t\"questiontx\"\tTEXT NOT NULL,\n" +
"\t\"questionpic\"\tBLOB,\n" +
"\t\"solutiontx\"\tTEXT NOT NULL,\n" +
"\t\"solutionpic\"\tBLOB,\n" +
"\t\"days\"\tINTEGER NOT NULL,\n" +
"\t\"bookid\"\tINTEGER NOT NULL,\n" +
"\t FOREIGN KEY (bookid)\n" +
" REFERENCES book_tbl (bookid)\n" +
");";
db.execSQL(card_tbl);
}