SQLite2XL icon indicating copy to clipboard operation
SQLite2XL copied to clipboard

table sqlite_sequence may not be dropped

Open elikf opened this issue 5 years ago • 2 comments

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;

elikf avatar Feb 07 '20 20:02 elikf

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'

flxholle avatar Apr 14 '20 14:04 flxholle

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

raheemadamboev avatar Jan 12 '21 00:01 raheemadamboev