I was working on a trivia app that gets the questions from a .txt file and then stores them in a database.
I have created a table named "Itemi" to store the question, which type of question is,four possible answers and the right answer.
Everytime I open the app, I delet all the data from the table and then insert it again. I did that to make the app portable. The .txt file is located in the "Debug" folder.
The problme is, although the table is deleted everytime I open the app and isert again the same data, the ID is not changing. Here is the commnad I used to delete the data.
cmd = new SqlCommand("DELETE FROM Itemi", sqc);
cmd.ExecuteNonQuery();
cmd.Dispose();
For example, this is how the id column looks like when I open the app:
As you can see, the Id is between 33-59.
If I run the app again:
The Ids changed
Is there a way I can avoid thhis ? I want the Ids to be between 1 and 30. I forgot to mention that the Id column has the primary key.