Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

table sqlite_sequence may not be dropped #25

Open
elikf opened this issue Feb 7, 2020 · 2 comments
Open

table sqlite_sequence may not be dropped #25

elikf opened this issue Feb 7, 2020 · 2 comments

Comments

@elikf
Copy link

elikf commented Feb 7, 2020

Expected behavior

Import data from excel to sqlite

Actual behavior

sending message :table sqlite_sequence may not be dropped(code 1):,while compiling:DROP TABLE IF EXISTS sqlite_sequence

Steps to reproduce the issue

String directory_path = Environment.getExternalStorageDirectory().getPath() + "/cashDesk.xls";
ExcelToSQLite excelToSQLite = new ExcelToSQLite(this, DBHelper.DATABASE_NAME, true);
excelToSQLite.importFromFile(directory_path, new ExcelToSQLite.ImportListener() {
@OverRide
public void onStart() {

                }

                @Override
                public void onCompleted(String dbName) {
                    Toast.makeText(getApplicationContext(), "خروجی بانک SqLite شما روی حافظه گوشی می باشد.", Toast.LENGTH_LONG).show();
                }

                @Override
                public void onError(Exception e) {
                    Toast.makeText(getApplicationContext(), e.toString() + "عملیات موفقیت آمیز نبود!...", Toast.LENGTH_LONG).show();
                }
            });
            break;
@flxholle
Copy link

flxholle commented Apr 14, 2020

I created a fork, where this is fixed: https://github.com/asdoi/SQLite2XL
It has something to do with the backup, so all backups you did before won't work.
Just add it in your app-gradle file:
implementation 'com.github.asdoi:SQLite2XL:e1b5e4d1cb'

@raheemadamboev
Copy link

same issue

I think it need to import sqlite_sequence table for primary key auto increment correctly

after importing xls file with this library, room just inserts null for primary key auto increment fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants