Error Code:1 (SQLITE_ERROR) Caused By : SQL(query) error or missing databaseWrong ordering in generated table in jpaAndroid SQL Database - rawQuery() Source not FoundWhy does my exception handler not trap Android SQLite insert error?Loadmanager onLoadFinished not calledHow to transfer Downloaded JSONArray to a Database?android: SQL(query) error or missing database. (near “0”: syntax error (code 1): , while compiling:Error Code : 1 (SQLITE_ERROR) AndroidError Code : 1 (SQLITE_ERROR) Caused By : SQL(query) error or missing databaseJavaFX: update tableview context by selected combobox(binding)When i call an item from SQLite Database by its id, “SQLiteDatabase db = this.getReadableDatabase()” causes error: a null object reference
Unexpected behavior of the procedure `Area` on the object 'Polygon'
Can a stoichiometric mixture of oxygen and methane exist as a liquid at standard pressure and some (low) temperature?
Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?
What is the evidence for the "tyranny of the majority problem" in a direct democracy context?
Does Doodling or Improvising on the Piano Have Any Benefits?
Lowest total scrabble score
Temporarily disable WLAN internet access for children, but allow it for adults
What should you do if you miss a job interview (deliberately)?
Does IPv6 have similar concept of network mask?
How do you make your own symbol when Detexify fails?
Plot of a tornado-shaped surface
Need help understanding what a natural log transformation is actually doing and why specific transformations are required for linear regression
Mimic lecturing on blackboard, facing audience
How could a planet have erratic days?
Using substitution ciphers to generate new alphabets in a novel
On a tidally locked planet, would time be quantized?
What exact color does ozone gas have?
Can I say "fingers" when referring to toes?
What are some good ways to treat frozen vegetables such that they behave like fresh vegetables when stir frying them?
Strong empirical falsification of quantum mechanics based on vacuum energy density
PTIJ: Haman's bad computer
How to cover method return statement in Apex Class?
Why should universal income be universal?
How does the math work for Perception checks?
Error Code:1 (SQLITE_ERROR) Caused By : SQL(query) error or missing database
Wrong ordering in generated table in jpaAndroid SQL Database - rawQuery() Source not FoundWhy does my exception handler not trap Android SQLite insert error?Loadmanager onLoadFinished not calledHow to transfer Downloaded JSONArray to a Database?android: SQL(query) error or missing database. (near “0”: syntax error (code 1): , while compiling:Error Code : 1 (SQLITE_ERROR) AndroidError Code : 1 (SQLITE_ERROR) Caused By : SQL(query) error or missing databaseJavaFX: update tableview context by selected combobox(binding)When i call an item from SQLite Database by its id, “SQLiteDatabase db = this.getReadableDatabase()” causes error: a null object reference
This is my Database Helper class and I getting Error This is y console
" Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6) "
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6) Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6) Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6) Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Anyone PLease Help
public class DatabaseHelper extends SQLiteOpenHelper
private static String DB_NAME = "ocinator.db";
private static String DB_PATH = "";
private static final int DB_VERSION = 8;
private SQLiteDatabase mDataBase;
private final Context mContext;
private boolean mNeedUpdate = false;
static final String PROFILE_TABLE = "CREATE TABLE profile (" +
" id_profile INTEGER PRIMARY KEY AUTOINCREMENT," +
" first_name VARCHAR (15)," +
" last_name VARCHAR (15)," +
" email VARCHAR (50)," +
" phone VARCHAR (30)," +
" login_status VARCHAR (20)," +
" username VARCHAR (30)," +
" password TEXT," +
" ocinator_id DOUBLE," +
" name VARCHAR (39)," +
" nickname VARCHAR (30)," +
" registered_date DATETIME" +
");";
static final String NOTIFICATIONS_TABLE = "CREATE TABLE notification_oc (" +
" notification_id INTEGER PRIMARY KEY AUTOINCREMENT," +
" notification_title TEXT," +
" notification_message TEXT," +
" notification_firetime DATETIME," +
" notification_creationtime DATETIME DEFAULT (CURRENT_TIMESTAMP)," +
" notification_status TEXT" +
");" ;
/**
* Constructor
* Takes and keeps a reference of the passed context in order to access to the application assets and resources.
* @param context
*/
public DatabaseHelper(Context context)
super(context, DB_NAME, null, DB_VERSION);
if (android.os.Build.VERSION.SDK_INT >= 17)
DB_PATH = context.getApplicationInfo().dataDir + "/databases/";
else
DB_PATH = "/data/data/" + context.getPackageName() + "/databases/";
this.mContext = context;
copyDataBase();
this.getReadableDatabase();
public void updateDataBase() throws IOException
if (mNeedUpdate)
File dbFile = new File(DB_PATH + DB_NAME);
if (dbFile.exists())
dbFile.delete();
copyDataBase();
mNeedUpdate = false;
private boolean checkDataBase()
File dbFile = new File(DB_PATH + DB_NAME);
return dbFile.exists();
private void copyDataBase()
if (!checkDataBase())
this.getReadableDatabase();
this.close();
try
copyDBFile();
catch (IOException mIOException)
throw new Error("ErrorCopyingDataBase");
private void copyDBFile() throws IOException
System.out.println("Input xx started");
InputStream mInput = mContext.getAssets().open(DB_NAME);
//InputStream mInput = mContext.getResources().openRawResource(R.raw.info);
OutputStream mOutput = new FileOutputStream(DB_PATH + DB_NAME);
byte[] mBuffer = new byte[1024];
int mLength;
while ((mLength = mInput.read(mBuffer)) > 0)
mOutput.write(mBuffer, 0, mLength);
mOutput.flush();
mOutput.close();
mInput.close();
public boolean openDataBase() throws SQLException
mDataBase = SQLiteDatabase.openDatabase(DB_PATH + DB_NAME, null, SQLiteDatabase.CREATE_IF_NECESSARY);
return mDataBase != null;
@Override
public synchronized void close()
if (mDataBase != null)
mDataBase.close();
super.close();
@Override
public void onCreate(SQLiteDatabase db)
// db.execSQL(PROFILE_TABLE);
// db.execSQL(NOTIFICATIONS_TABLE);
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
if (newVersion > oldVersion)
mNeedUpdate = true;
// db.execSQL("DROP TABLE IF EXISTS profile");
// db.execSQL("DROP TABLE IF EXISTS notification_oc");
// onCreate(db);
public boolean insertNotification (String title, String msg, String time, String status)
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("notification_title", title);
contentValues.put("notification_message", msg);
contentValues.put("notification_firetime", time);
contentValues.put("notification_status", status);
db.insert("notification_oc", null, contentValues);
return true;
public ArrayList<String> getAllNotifications()
ArrayList<String> array_list = new ArrayList<String>();
//hp = new HashMap();
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from notification_oc", null );
res.moveToFirst();
while(res.isAfterLast() == false)
array_list.add(res.getString(res.getColumnIndex("notification_title")));
res.moveToNext();
return array_list;
public Cursor getNotification(int id)
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from notification_oc where notification_id="+id+"", null );
return res;
public int numberOfRowsInNotifications()
SQLiteDatabase db = this.getReadableDatabase();
int numRows = (int) DatabaseUtils.queryNumEntries(db, "notification_oc");
return numRows;
public Integer deleteNotification (Integer id)
SQLiteDatabase db = this.getWritableDatabase();
return db.delete("notification_oc",
"notification_id = ? ",
new String[] Integer.toString(id) );
public boolean insertUser (String username, String password, String nickname, String email)
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("username", username);
contentValues.put("password", password);
contentValues.put("nickname", nickname);
contentValues.put("email", email);
db.insert("profile", null, contentValues);
return true;
public Integer deleteUser (Integer id)
SQLiteDatabase db = this.getWritableDatabase();
return db.delete("profile",
"id_profile = ? ",
new String[] Integer.toString(id) );
public Cursor getUser(int id)
SQLiteDatabase db = this.getReadableDatabase();
System.out.println("USERNAMEX1 : 111" );
Cursor res = db.rawQuery( "select * from profile where id_profile="+id+"", null );
System.out.println("USERNAMEX2 : 222" );
return res;
// Add your public helper methods to access and get content from the database.
// You could return cursors by doing "return myDataBase.query(....)" so it'd be easy
// to you to create adapters for your views.
java android
add a comment |
This is my Database Helper class and I getting Error This is y console
" Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6) "
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6) Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6) Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6) Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Anyone PLease Help
public class DatabaseHelper extends SQLiteOpenHelper
private static String DB_NAME = "ocinator.db";
private static String DB_PATH = "";
private static final int DB_VERSION = 8;
private SQLiteDatabase mDataBase;
private final Context mContext;
private boolean mNeedUpdate = false;
static final String PROFILE_TABLE = "CREATE TABLE profile (" +
" id_profile INTEGER PRIMARY KEY AUTOINCREMENT," +
" first_name VARCHAR (15)," +
" last_name VARCHAR (15)," +
" email VARCHAR (50)," +
" phone VARCHAR (30)," +
" login_status VARCHAR (20)," +
" username VARCHAR (30)," +
" password TEXT," +
" ocinator_id DOUBLE," +
" name VARCHAR (39)," +
" nickname VARCHAR (30)," +
" registered_date DATETIME" +
");";
static final String NOTIFICATIONS_TABLE = "CREATE TABLE notification_oc (" +
" notification_id INTEGER PRIMARY KEY AUTOINCREMENT," +
" notification_title TEXT," +
" notification_message TEXT," +
" notification_firetime DATETIME," +
" notification_creationtime DATETIME DEFAULT (CURRENT_TIMESTAMP)," +
" notification_status TEXT" +
");" ;
/**
* Constructor
* Takes and keeps a reference of the passed context in order to access to the application assets and resources.
* @param context
*/
public DatabaseHelper(Context context)
super(context, DB_NAME, null, DB_VERSION);
if (android.os.Build.VERSION.SDK_INT >= 17)
DB_PATH = context.getApplicationInfo().dataDir + "/databases/";
else
DB_PATH = "/data/data/" + context.getPackageName() + "/databases/";
this.mContext = context;
copyDataBase();
this.getReadableDatabase();
public void updateDataBase() throws IOException
if (mNeedUpdate)
File dbFile = new File(DB_PATH + DB_NAME);
if (dbFile.exists())
dbFile.delete();
copyDataBase();
mNeedUpdate = false;
private boolean checkDataBase()
File dbFile = new File(DB_PATH + DB_NAME);
return dbFile.exists();
private void copyDataBase()
if (!checkDataBase())
this.getReadableDatabase();
this.close();
try
copyDBFile();
catch (IOException mIOException)
throw new Error("ErrorCopyingDataBase");
private void copyDBFile() throws IOException
System.out.println("Input xx started");
InputStream mInput = mContext.getAssets().open(DB_NAME);
//InputStream mInput = mContext.getResources().openRawResource(R.raw.info);
OutputStream mOutput = new FileOutputStream(DB_PATH + DB_NAME);
byte[] mBuffer = new byte[1024];
int mLength;
while ((mLength = mInput.read(mBuffer)) > 0)
mOutput.write(mBuffer, 0, mLength);
mOutput.flush();
mOutput.close();
mInput.close();
public boolean openDataBase() throws SQLException
mDataBase = SQLiteDatabase.openDatabase(DB_PATH + DB_NAME, null, SQLiteDatabase.CREATE_IF_NECESSARY);
return mDataBase != null;
@Override
public synchronized void close()
if (mDataBase != null)
mDataBase.close();
super.close();
@Override
public void onCreate(SQLiteDatabase db)
// db.execSQL(PROFILE_TABLE);
// db.execSQL(NOTIFICATIONS_TABLE);
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
if (newVersion > oldVersion)
mNeedUpdate = true;
// db.execSQL("DROP TABLE IF EXISTS profile");
// db.execSQL("DROP TABLE IF EXISTS notification_oc");
// onCreate(db);
public boolean insertNotification (String title, String msg, String time, String status)
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("notification_title", title);
contentValues.put("notification_message", msg);
contentValues.put("notification_firetime", time);
contentValues.put("notification_status", status);
db.insert("notification_oc", null, contentValues);
return true;
public ArrayList<String> getAllNotifications()
ArrayList<String> array_list = new ArrayList<String>();
//hp = new HashMap();
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from notification_oc", null );
res.moveToFirst();
while(res.isAfterLast() == false)
array_list.add(res.getString(res.getColumnIndex("notification_title")));
res.moveToNext();
return array_list;
public Cursor getNotification(int id)
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from notification_oc where notification_id="+id+"", null );
return res;
public int numberOfRowsInNotifications()
SQLiteDatabase db = this.getReadableDatabase();
int numRows = (int) DatabaseUtils.queryNumEntries(db, "notification_oc");
return numRows;
public Integer deleteNotification (Integer id)
SQLiteDatabase db = this.getWritableDatabase();
return db.delete("notification_oc",
"notification_id = ? ",
new String[] Integer.toString(id) );
public boolean insertUser (String username, String password, String nickname, String email)
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("username", username);
contentValues.put("password", password);
contentValues.put("nickname", nickname);
contentValues.put("email", email);
db.insert("profile", null, contentValues);
return true;
public Integer deleteUser (Integer id)
SQLiteDatabase db = this.getWritableDatabase();
return db.delete("profile",
"id_profile = ? ",
new String[] Integer.toString(id) );
public Cursor getUser(int id)
SQLiteDatabase db = this.getReadableDatabase();
System.out.println("USERNAMEX1 : 111" );
Cursor res = db.rawQuery( "select * from profile where id_profile="+id+"", null );
System.out.println("USERNAMEX2 : 222" );
return res;
// Add your public helper methods to access and get content from the database.
// You could return cursors by doing "return myDataBase.query(....)" so it'd be easy
// to you to create adapters for your views.
java android
What is db version in the file you copy? is it same as 8?
– AIMIN PAN
Mar 8 at 3:44
Yes it is same but I have also tried after change it
– Shivam sehrawat
Mar 9 at 17:03
add a comment |
This is my Database Helper class and I getting Error This is y console
" Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6) "
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6) Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6) Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6) Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Anyone PLease Help
public class DatabaseHelper extends SQLiteOpenHelper
private static String DB_NAME = "ocinator.db";
private static String DB_PATH = "";
private static final int DB_VERSION = 8;
private SQLiteDatabase mDataBase;
private final Context mContext;
private boolean mNeedUpdate = false;
static final String PROFILE_TABLE = "CREATE TABLE profile (" +
" id_profile INTEGER PRIMARY KEY AUTOINCREMENT," +
" first_name VARCHAR (15)," +
" last_name VARCHAR (15)," +
" email VARCHAR (50)," +
" phone VARCHAR (30)," +
" login_status VARCHAR (20)," +
" username VARCHAR (30)," +
" password TEXT," +
" ocinator_id DOUBLE," +
" name VARCHAR (39)," +
" nickname VARCHAR (30)," +
" registered_date DATETIME" +
");";
static final String NOTIFICATIONS_TABLE = "CREATE TABLE notification_oc (" +
" notification_id INTEGER PRIMARY KEY AUTOINCREMENT," +
" notification_title TEXT," +
" notification_message TEXT," +
" notification_firetime DATETIME," +
" notification_creationtime DATETIME DEFAULT (CURRENT_TIMESTAMP)," +
" notification_status TEXT" +
");" ;
/**
* Constructor
* Takes and keeps a reference of the passed context in order to access to the application assets and resources.
* @param context
*/
public DatabaseHelper(Context context)
super(context, DB_NAME, null, DB_VERSION);
if (android.os.Build.VERSION.SDK_INT >= 17)
DB_PATH = context.getApplicationInfo().dataDir + "/databases/";
else
DB_PATH = "/data/data/" + context.getPackageName() + "/databases/";
this.mContext = context;
copyDataBase();
this.getReadableDatabase();
public void updateDataBase() throws IOException
if (mNeedUpdate)
File dbFile = new File(DB_PATH + DB_NAME);
if (dbFile.exists())
dbFile.delete();
copyDataBase();
mNeedUpdate = false;
private boolean checkDataBase()
File dbFile = new File(DB_PATH + DB_NAME);
return dbFile.exists();
private void copyDataBase()
if (!checkDataBase())
this.getReadableDatabase();
this.close();
try
copyDBFile();
catch (IOException mIOException)
throw new Error("ErrorCopyingDataBase");
private void copyDBFile() throws IOException
System.out.println("Input xx started");
InputStream mInput = mContext.getAssets().open(DB_NAME);
//InputStream mInput = mContext.getResources().openRawResource(R.raw.info);
OutputStream mOutput = new FileOutputStream(DB_PATH + DB_NAME);
byte[] mBuffer = new byte[1024];
int mLength;
while ((mLength = mInput.read(mBuffer)) > 0)
mOutput.write(mBuffer, 0, mLength);
mOutput.flush();
mOutput.close();
mInput.close();
public boolean openDataBase() throws SQLException
mDataBase = SQLiteDatabase.openDatabase(DB_PATH + DB_NAME, null, SQLiteDatabase.CREATE_IF_NECESSARY);
return mDataBase != null;
@Override
public synchronized void close()
if (mDataBase != null)
mDataBase.close();
super.close();
@Override
public void onCreate(SQLiteDatabase db)
// db.execSQL(PROFILE_TABLE);
// db.execSQL(NOTIFICATIONS_TABLE);
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
if (newVersion > oldVersion)
mNeedUpdate = true;
// db.execSQL("DROP TABLE IF EXISTS profile");
// db.execSQL("DROP TABLE IF EXISTS notification_oc");
// onCreate(db);
public boolean insertNotification (String title, String msg, String time, String status)
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("notification_title", title);
contentValues.put("notification_message", msg);
contentValues.put("notification_firetime", time);
contentValues.put("notification_status", status);
db.insert("notification_oc", null, contentValues);
return true;
public ArrayList<String> getAllNotifications()
ArrayList<String> array_list = new ArrayList<String>();
//hp = new HashMap();
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from notification_oc", null );
res.moveToFirst();
while(res.isAfterLast() == false)
array_list.add(res.getString(res.getColumnIndex("notification_title")));
res.moveToNext();
return array_list;
public Cursor getNotification(int id)
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from notification_oc where notification_id="+id+"", null );
return res;
public int numberOfRowsInNotifications()
SQLiteDatabase db = this.getReadableDatabase();
int numRows = (int) DatabaseUtils.queryNumEntries(db, "notification_oc");
return numRows;
public Integer deleteNotification (Integer id)
SQLiteDatabase db = this.getWritableDatabase();
return db.delete("notification_oc",
"notification_id = ? ",
new String[] Integer.toString(id) );
public boolean insertUser (String username, String password, String nickname, String email)
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("username", username);
contentValues.put("password", password);
contentValues.put("nickname", nickname);
contentValues.put("email", email);
db.insert("profile", null, contentValues);
return true;
public Integer deleteUser (Integer id)
SQLiteDatabase db = this.getWritableDatabase();
return db.delete("profile",
"id_profile = ? ",
new String[] Integer.toString(id) );
public Cursor getUser(int id)
SQLiteDatabase db = this.getReadableDatabase();
System.out.println("USERNAMEX1 : 111" );
Cursor res = db.rawQuery( "select * from profile where id_profile="+id+"", null );
System.out.println("USERNAMEX2 : 222" );
return res;
// Add your public helper methods to access and get content from the database.
// You could return cursors by doing "return myDataBase.query(....)" so it'd be easy
// to you to create adapters for your views.
java android
This is my Database Helper class and I getting Error This is y console
" Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6) "
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6) Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6) Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6) Caused By : SQL(query) error or missing database. (no such table: profile (code 1): , while compiling: select * from profile where id_profile=6)
Anyone PLease Help
public class DatabaseHelper extends SQLiteOpenHelper
private static String DB_NAME = "ocinator.db";
private static String DB_PATH = "";
private static final int DB_VERSION = 8;
private SQLiteDatabase mDataBase;
private final Context mContext;
private boolean mNeedUpdate = false;
static final String PROFILE_TABLE = "CREATE TABLE profile (" +
" id_profile INTEGER PRIMARY KEY AUTOINCREMENT," +
" first_name VARCHAR (15)," +
" last_name VARCHAR (15)," +
" email VARCHAR (50)," +
" phone VARCHAR (30)," +
" login_status VARCHAR (20)," +
" username VARCHAR (30)," +
" password TEXT," +
" ocinator_id DOUBLE," +
" name VARCHAR (39)," +
" nickname VARCHAR (30)," +
" registered_date DATETIME" +
");";
static final String NOTIFICATIONS_TABLE = "CREATE TABLE notification_oc (" +
" notification_id INTEGER PRIMARY KEY AUTOINCREMENT," +
" notification_title TEXT," +
" notification_message TEXT," +
" notification_firetime DATETIME," +
" notification_creationtime DATETIME DEFAULT (CURRENT_TIMESTAMP)," +
" notification_status TEXT" +
");" ;
/**
* Constructor
* Takes and keeps a reference of the passed context in order to access to the application assets and resources.
* @param context
*/
public DatabaseHelper(Context context)
super(context, DB_NAME, null, DB_VERSION);
if (android.os.Build.VERSION.SDK_INT >= 17)
DB_PATH = context.getApplicationInfo().dataDir + "/databases/";
else
DB_PATH = "/data/data/" + context.getPackageName() + "/databases/";
this.mContext = context;
copyDataBase();
this.getReadableDatabase();
public void updateDataBase() throws IOException
if (mNeedUpdate)
File dbFile = new File(DB_PATH + DB_NAME);
if (dbFile.exists())
dbFile.delete();
copyDataBase();
mNeedUpdate = false;
private boolean checkDataBase()
File dbFile = new File(DB_PATH + DB_NAME);
return dbFile.exists();
private void copyDataBase()
if (!checkDataBase())
this.getReadableDatabase();
this.close();
try
copyDBFile();
catch (IOException mIOException)
throw new Error("ErrorCopyingDataBase");
private void copyDBFile() throws IOException
System.out.println("Input xx started");
InputStream mInput = mContext.getAssets().open(DB_NAME);
//InputStream mInput = mContext.getResources().openRawResource(R.raw.info);
OutputStream mOutput = new FileOutputStream(DB_PATH + DB_NAME);
byte[] mBuffer = new byte[1024];
int mLength;
while ((mLength = mInput.read(mBuffer)) > 0)
mOutput.write(mBuffer, 0, mLength);
mOutput.flush();
mOutput.close();
mInput.close();
public boolean openDataBase() throws SQLException
mDataBase = SQLiteDatabase.openDatabase(DB_PATH + DB_NAME, null, SQLiteDatabase.CREATE_IF_NECESSARY);
return mDataBase != null;
@Override
public synchronized void close()
if (mDataBase != null)
mDataBase.close();
super.close();
@Override
public void onCreate(SQLiteDatabase db)
// db.execSQL(PROFILE_TABLE);
// db.execSQL(NOTIFICATIONS_TABLE);
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
if (newVersion > oldVersion)
mNeedUpdate = true;
// db.execSQL("DROP TABLE IF EXISTS profile");
// db.execSQL("DROP TABLE IF EXISTS notification_oc");
// onCreate(db);
public boolean insertNotification (String title, String msg, String time, String status)
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("notification_title", title);
contentValues.put("notification_message", msg);
contentValues.put("notification_firetime", time);
contentValues.put("notification_status", status);
db.insert("notification_oc", null, contentValues);
return true;
public ArrayList<String> getAllNotifications()
ArrayList<String> array_list = new ArrayList<String>();
//hp = new HashMap();
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from notification_oc", null );
res.moveToFirst();
while(res.isAfterLast() == false)
array_list.add(res.getString(res.getColumnIndex("notification_title")));
res.moveToNext();
return array_list;
public Cursor getNotification(int id)
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from notification_oc where notification_id="+id+"", null );
return res;
public int numberOfRowsInNotifications()
SQLiteDatabase db = this.getReadableDatabase();
int numRows = (int) DatabaseUtils.queryNumEntries(db, "notification_oc");
return numRows;
public Integer deleteNotification (Integer id)
SQLiteDatabase db = this.getWritableDatabase();
return db.delete("notification_oc",
"notification_id = ? ",
new String[] Integer.toString(id) );
public boolean insertUser (String username, String password, String nickname, String email)
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("username", username);
contentValues.put("password", password);
contentValues.put("nickname", nickname);
contentValues.put("email", email);
db.insert("profile", null, contentValues);
return true;
public Integer deleteUser (Integer id)
SQLiteDatabase db = this.getWritableDatabase();
return db.delete("profile",
"id_profile = ? ",
new String[] Integer.toString(id) );
public Cursor getUser(int id)
SQLiteDatabase db = this.getReadableDatabase();
System.out.println("USERNAMEX1 : 111" );
Cursor res = db.rawQuery( "select * from profile where id_profile="+id+"", null );
System.out.println("USERNAMEX2 : 222" );
return res;
// Add your public helper methods to access and get content from the database.
// You could return cursors by doing "return myDataBase.query(....)" so it'd be easy
// to you to create adapters for your views.
public class DatabaseHelper extends SQLiteOpenHelper
private static String DB_NAME = "ocinator.db";
private static String DB_PATH = "";
private static final int DB_VERSION = 8;
private SQLiteDatabase mDataBase;
private final Context mContext;
private boolean mNeedUpdate = false;
static final String PROFILE_TABLE = "CREATE TABLE profile (" +
" id_profile INTEGER PRIMARY KEY AUTOINCREMENT," +
" first_name VARCHAR (15)," +
" last_name VARCHAR (15)," +
" email VARCHAR (50)," +
" phone VARCHAR (30)," +
" login_status VARCHAR (20)," +
" username VARCHAR (30)," +
" password TEXT," +
" ocinator_id DOUBLE," +
" name VARCHAR (39)," +
" nickname VARCHAR (30)," +
" registered_date DATETIME" +
");";
static final String NOTIFICATIONS_TABLE = "CREATE TABLE notification_oc (" +
" notification_id INTEGER PRIMARY KEY AUTOINCREMENT," +
" notification_title TEXT," +
" notification_message TEXT," +
" notification_firetime DATETIME," +
" notification_creationtime DATETIME DEFAULT (CURRENT_TIMESTAMP)," +
" notification_status TEXT" +
");" ;
/**
* Constructor
* Takes and keeps a reference of the passed context in order to access to the application assets and resources.
* @param context
*/
public DatabaseHelper(Context context)
super(context, DB_NAME, null, DB_VERSION);
if (android.os.Build.VERSION.SDK_INT >= 17)
DB_PATH = context.getApplicationInfo().dataDir + "/databases/";
else
DB_PATH = "/data/data/" + context.getPackageName() + "/databases/";
this.mContext = context;
copyDataBase();
this.getReadableDatabase();
public void updateDataBase() throws IOException
if (mNeedUpdate)
File dbFile = new File(DB_PATH + DB_NAME);
if (dbFile.exists())
dbFile.delete();
copyDataBase();
mNeedUpdate = false;
private boolean checkDataBase()
File dbFile = new File(DB_PATH + DB_NAME);
return dbFile.exists();
private void copyDataBase()
if (!checkDataBase())
this.getReadableDatabase();
this.close();
try
copyDBFile();
catch (IOException mIOException)
throw new Error("ErrorCopyingDataBase");
private void copyDBFile() throws IOException
System.out.println("Input xx started");
InputStream mInput = mContext.getAssets().open(DB_NAME);
//InputStream mInput = mContext.getResources().openRawResource(R.raw.info);
OutputStream mOutput = new FileOutputStream(DB_PATH + DB_NAME);
byte[] mBuffer = new byte[1024];
int mLength;
while ((mLength = mInput.read(mBuffer)) > 0)
mOutput.write(mBuffer, 0, mLength);
mOutput.flush();
mOutput.close();
mInput.close();
public boolean openDataBase() throws SQLException
mDataBase = SQLiteDatabase.openDatabase(DB_PATH + DB_NAME, null, SQLiteDatabase.CREATE_IF_NECESSARY);
return mDataBase != null;
@Override
public synchronized void close()
if (mDataBase != null)
mDataBase.close();
super.close();
@Override
public void onCreate(SQLiteDatabase db)
// db.execSQL(PROFILE_TABLE);
// db.execSQL(NOTIFICATIONS_TABLE);
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
if (newVersion > oldVersion)
mNeedUpdate = true;
// db.execSQL("DROP TABLE IF EXISTS profile");
// db.execSQL("DROP TABLE IF EXISTS notification_oc");
// onCreate(db);
public boolean insertNotification (String title, String msg, String time, String status)
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("notification_title", title);
contentValues.put("notification_message", msg);
contentValues.put("notification_firetime", time);
contentValues.put("notification_status", status);
db.insert("notification_oc", null, contentValues);
return true;
public ArrayList<String> getAllNotifications()
ArrayList<String> array_list = new ArrayList<String>();
//hp = new HashMap();
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from notification_oc", null );
res.moveToFirst();
while(res.isAfterLast() == false)
array_list.add(res.getString(res.getColumnIndex("notification_title")));
res.moveToNext();
return array_list;
public Cursor getNotification(int id)
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from notification_oc where notification_id="+id+"", null );
return res;
public int numberOfRowsInNotifications()
SQLiteDatabase db = this.getReadableDatabase();
int numRows = (int) DatabaseUtils.queryNumEntries(db, "notification_oc");
return numRows;
public Integer deleteNotification (Integer id)
SQLiteDatabase db = this.getWritableDatabase();
return db.delete("notification_oc",
"notification_id = ? ",
new String[] Integer.toString(id) );
public boolean insertUser (String username, String password, String nickname, String email)
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("username", username);
contentValues.put("password", password);
contentValues.put("nickname", nickname);
contentValues.put("email", email);
db.insert("profile", null, contentValues);
return true;
public Integer deleteUser (Integer id)
SQLiteDatabase db = this.getWritableDatabase();
return db.delete("profile",
"id_profile = ? ",
new String[] Integer.toString(id) );
public Cursor getUser(int id)
SQLiteDatabase db = this.getReadableDatabase();
System.out.println("USERNAMEX1 : 111" );
Cursor res = db.rawQuery( "select * from profile where id_profile="+id+"", null );
System.out.println("USERNAMEX2 : 222" );
return res;
// Add your public helper methods to access and get content from the database.
// You could return cursors by doing "return myDataBase.query(....)" so it'd be easy
// to you to create adapters for your views.
public class DatabaseHelper extends SQLiteOpenHelper
private static String DB_NAME = "ocinator.db";
private static String DB_PATH = "";
private static final int DB_VERSION = 8;
private SQLiteDatabase mDataBase;
private final Context mContext;
private boolean mNeedUpdate = false;
static final String PROFILE_TABLE = "CREATE TABLE profile (" +
" id_profile INTEGER PRIMARY KEY AUTOINCREMENT," +
" first_name VARCHAR (15)," +
" last_name VARCHAR (15)," +
" email VARCHAR (50)," +
" phone VARCHAR (30)," +
" login_status VARCHAR (20)," +
" username VARCHAR (30)," +
" password TEXT," +
" ocinator_id DOUBLE," +
" name VARCHAR (39)," +
" nickname VARCHAR (30)," +
" registered_date DATETIME" +
");";
static final String NOTIFICATIONS_TABLE = "CREATE TABLE notification_oc (" +
" notification_id INTEGER PRIMARY KEY AUTOINCREMENT," +
" notification_title TEXT," +
" notification_message TEXT," +
" notification_firetime DATETIME," +
" notification_creationtime DATETIME DEFAULT (CURRENT_TIMESTAMP)," +
" notification_status TEXT" +
");" ;
/**
* Constructor
* Takes and keeps a reference of the passed context in order to access to the application assets and resources.
* @param context
*/
public DatabaseHelper(Context context)
super(context, DB_NAME, null, DB_VERSION);
if (android.os.Build.VERSION.SDK_INT >= 17)
DB_PATH = context.getApplicationInfo().dataDir + "/databases/";
else
DB_PATH = "/data/data/" + context.getPackageName() + "/databases/";
this.mContext = context;
copyDataBase();
this.getReadableDatabase();
public void updateDataBase() throws IOException
if (mNeedUpdate)
File dbFile = new File(DB_PATH + DB_NAME);
if (dbFile.exists())
dbFile.delete();
copyDataBase();
mNeedUpdate = false;
private boolean checkDataBase()
File dbFile = new File(DB_PATH + DB_NAME);
return dbFile.exists();
private void copyDataBase()
if (!checkDataBase())
this.getReadableDatabase();
this.close();
try
copyDBFile();
catch (IOException mIOException)
throw new Error("ErrorCopyingDataBase");
private void copyDBFile() throws IOException
System.out.println("Input xx started");
InputStream mInput = mContext.getAssets().open(DB_NAME);
//InputStream mInput = mContext.getResources().openRawResource(R.raw.info);
OutputStream mOutput = new FileOutputStream(DB_PATH + DB_NAME);
byte[] mBuffer = new byte[1024];
int mLength;
while ((mLength = mInput.read(mBuffer)) > 0)
mOutput.write(mBuffer, 0, mLength);
mOutput.flush();
mOutput.close();
mInput.close();
public boolean openDataBase() throws SQLException
mDataBase = SQLiteDatabase.openDatabase(DB_PATH + DB_NAME, null, SQLiteDatabase.CREATE_IF_NECESSARY);
return mDataBase != null;
@Override
public synchronized void close()
if (mDataBase != null)
mDataBase.close();
super.close();
@Override
public void onCreate(SQLiteDatabase db)
// db.execSQL(PROFILE_TABLE);
// db.execSQL(NOTIFICATIONS_TABLE);
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
if (newVersion > oldVersion)
mNeedUpdate = true;
// db.execSQL("DROP TABLE IF EXISTS profile");
// db.execSQL("DROP TABLE IF EXISTS notification_oc");
// onCreate(db);
public boolean insertNotification (String title, String msg, String time, String status)
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("notification_title", title);
contentValues.put("notification_message", msg);
contentValues.put("notification_firetime", time);
contentValues.put("notification_status", status);
db.insert("notification_oc", null, contentValues);
return true;
public ArrayList<String> getAllNotifications()
ArrayList<String> array_list = new ArrayList<String>();
//hp = new HashMap();
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from notification_oc", null );
res.moveToFirst();
while(res.isAfterLast() == false)
array_list.add(res.getString(res.getColumnIndex("notification_title")));
res.moveToNext();
return array_list;
public Cursor getNotification(int id)
SQLiteDatabase db = this.getReadableDatabase();
Cursor res = db.rawQuery( "select * from notification_oc where notification_id="+id+"", null );
return res;
public int numberOfRowsInNotifications()
SQLiteDatabase db = this.getReadableDatabase();
int numRows = (int) DatabaseUtils.queryNumEntries(db, "notification_oc");
return numRows;
public Integer deleteNotification (Integer id)
SQLiteDatabase db = this.getWritableDatabase();
return db.delete("notification_oc",
"notification_id = ? ",
new String[] Integer.toString(id) );
public boolean insertUser (String username, String password, String nickname, String email)
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("username", username);
contentValues.put("password", password);
contentValues.put("nickname", nickname);
contentValues.put("email", email);
db.insert("profile", null, contentValues);
return true;
public Integer deleteUser (Integer id)
SQLiteDatabase db = this.getWritableDatabase();
return db.delete("profile",
"id_profile = ? ",
new String[] Integer.toString(id) );
public Cursor getUser(int id)
SQLiteDatabase db = this.getReadableDatabase();
System.out.println("USERNAMEX1 : 111" );
Cursor res = db.rawQuery( "select * from profile where id_profile="+id+"", null );
System.out.println("USERNAMEX2 : 222" );
return res;
// Add your public helper methods to access and get content from the database.
// You could return cursors by doing "return myDataBase.query(....)" so it'd be easy
// to you to create adapters for your views.
java android
java android
asked Mar 8 at 2:05
Shivam sehrawatShivam sehrawat
14
14
What is db version in the file you copy? is it same as 8?
– AIMIN PAN
Mar 8 at 3:44
Yes it is same but I have also tried after change it
– Shivam sehrawat
Mar 9 at 17:03
add a comment |
What is db version in the file you copy? is it same as 8?
– AIMIN PAN
Mar 8 at 3:44
Yes it is same but I have also tried after change it
– Shivam sehrawat
Mar 9 at 17:03
What is db version in the file you copy? is it same as 8?
– AIMIN PAN
Mar 8 at 3:44
What is db version in the file you copy? is it same as 8?
– AIMIN PAN
Mar 8 at 3:44
Yes it is same but I have also tried after change it
– Shivam sehrawat
Mar 9 at 17:03
Yes it is same but I have also tried after change it
– Shivam sehrawat
Mar 9 at 17:03
add a comment |
1 Answer
1
active
oldest
votes
You are using this for the database dir:
if (android.os.Build.VERSION.SDK_INT >= 17)
DB_PATH = context.getApplicationInfo().dataDir + "/databases/";
else
DB_PATH = "/data/data/" + context.getPackageName() + "/databases/";
and then
DB_PATH + DB_NAME
You should use this as copy destination.
context.getDatabasePath() + "/" + DB_NAME
It seems problem is you copied to somewhere which is not dir for SQLiteOpenHelper. Though mDatabase is used to open the file after you copy, it is not what SQLiteOpenHelper will use, and SQLiteOpenHelper will use its own for getReadableDatabase and getWritableDatabase, which is not the copied one, and it does not have the table you want.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55055724%2ferror-code1-sqlite-error-caused-by-sqlquery-error-or-missing-database%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You are using this for the database dir:
if (android.os.Build.VERSION.SDK_INT >= 17)
DB_PATH = context.getApplicationInfo().dataDir + "/databases/";
else
DB_PATH = "/data/data/" + context.getPackageName() + "/databases/";
and then
DB_PATH + DB_NAME
You should use this as copy destination.
context.getDatabasePath() + "/" + DB_NAME
It seems problem is you copied to somewhere which is not dir for SQLiteOpenHelper. Though mDatabase is used to open the file after you copy, it is not what SQLiteOpenHelper will use, and SQLiteOpenHelper will use its own for getReadableDatabase and getWritableDatabase, which is not the copied one, and it does not have the table you want.
add a comment |
You are using this for the database dir:
if (android.os.Build.VERSION.SDK_INT >= 17)
DB_PATH = context.getApplicationInfo().dataDir + "/databases/";
else
DB_PATH = "/data/data/" + context.getPackageName() + "/databases/";
and then
DB_PATH + DB_NAME
You should use this as copy destination.
context.getDatabasePath() + "/" + DB_NAME
It seems problem is you copied to somewhere which is not dir for SQLiteOpenHelper. Though mDatabase is used to open the file after you copy, it is not what SQLiteOpenHelper will use, and SQLiteOpenHelper will use its own for getReadableDatabase and getWritableDatabase, which is not the copied one, and it does not have the table you want.
add a comment |
You are using this for the database dir:
if (android.os.Build.VERSION.SDK_INT >= 17)
DB_PATH = context.getApplicationInfo().dataDir + "/databases/";
else
DB_PATH = "/data/data/" + context.getPackageName() + "/databases/";
and then
DB_PATH + DB_NAME
You should use this as copy destination.
context.getDatabasePath() + "/" + DB_NAME
It seems problem is you copied to somewhere which is not dir for SQLiteOpenHelper. Though mDatabase is used to open the file after you copy, it is not what SQLiteOpenHelper will use, and SQLiteOpenHelper will use its own for getReadableDatabase and getWritableDatabase, which is not the copied one, and it does not have the table you want.
You are using this for the database dir:
if (android.os.Build.VERSION.SDK_INT >= 17)
DB_PATH = context.getApplicationInfo().dataDir + "/databases/";
else
DB_PATH = "/data/data/" + context.getPackageName() + "/databases/";
and then
DB_PATH + DB_NAME
You should use this as copy destination.
context.getDatabasePath() + "/" + DB_NAME
It seems problem is you copied to somewhere which is not dir for SQLiteOpenHelper. Though mDatabase is used to open the file after you copy, it is not what SQLiteOpenHelper will use, and SQLiteOpenHelper will use its own for getReadableDatabase and getWritableDatabase, which is not the copied one, and it does not have the table you want.
answered Mar 12 at 3:38
AIMIN PANAIMIN PAN
269210
269210
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55055724%2ferror-code1-sqlite-error-caused-by-sqlquery-error-or-missing-database%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What is db version in the file you copy? is it same as 8?
– AIMIN PAN
Mar 8 at 3:44
Yes it is same but I have also tried after change it
– Shivam sehrawat
Mar 9 at 17:03