ChairmanSaab ChairmanSaab - 1 year ago 87
Android Question

PRIMARY key must be unique (Code 19) Android, Unable to overwrite table record

I'm trying to import .CSV file into a table but it returns error as mention below

CSV import error:

PRIMARY key must be unique (Code 19)


I'm using a Android application called aSQlite Manager ( Google Play store) to export and import .CSV files.

Database file belongs to MyWordBook [by Frozened, com.frozenarts.mynotebook ] , An App i use to build my vocab words. This application has very nice user interface but it lacks IMPORT word list feature, i'm trying to manually import my word list, developer won't respond and there is no good alternative app i can find.

It has IMPORT/EXPORT database feature though.

Mynotebook.db and mots.csv in .zip

'Mots' is name of the table where word list data is stored. You can do it one by one, no problem but will take months for me.

I've tried importing and exporting .csv file without any edits(identical) ,it still throws an error. What is going wrong here? How to solve it?

PS: My word list has over 4000 words

Answer Source

There are one or more entries in your CSV file with the same primary key. In your case the word Aortic has an ID of "2" which already exists in your database.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download