L
L
lavagod2019-11-18 17:27:14
SQLite
lavagod, 2019-11-18 17:27:14

Why can't a newly created record in SQLite be deleted?

Good afternoon
I am writing a database in Python + tkinted. Everything works, everything is according to the directory, but there is a problem: when the application is opened, the data is read from the database and is perfectly deleted, changed, created ... but the newly added data does not want to be deleted (both changed and created).
That is, let's say there is a table with 3 records ID=1,2,3. I delete the first record - was deleted. I'm trying to add a record with ID=1 - it's not possible, it's not a unique identifier. But the entry with ID=1 has been deleted, why not? In the same way, I add a record with ID=4 - everything is ok, I added it. But you can’t change it, the request just doesn’t pass. Moreover, the same request for 1-2-3 records changes the data, because Are they "old"?
Question: after actions with the base (deletion, insertion, addition), do I need to do something other than commit?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question