Reputation: 1817
Hi I created a SQLite database using the code below.
$db = new SQLiteDatabase("train");
@$db->queryExec("CREATE TABLE words(id INTEGER PRIMARY KEY,word TEXT,meaning TEXT,sentence TEXT)");
$query = "CREATE TABLE android_metadata(locale TEXT DEFAULT 'en_US')";
@$db->queryExec($query);
$query = "INSERT INTO android_metadata(locale) VALUES ('en_US')";
@$db->queryExec($query);
I tried to open the above database file using SQLLite Database browser 2.0 b1 but its showing "An error occurred: File is not a SQLite 3 database". Is it expected??
Also when I try to open the database in android its showing the following error "Failed to setLocale() when constructing, closing the database"
but I have the table android_metadata with column locale and I have inserted one row also..
Why is this happening? Anything wrong in database creation?
Thanks and Regards
Upvotes: 0
Views: 214