Topic: Faire revenir Id a 0
Bonjour a Tous
J'ai besoin de votre aide
Apres avoir effacé le contenu d'une base je voudrai faire revenir Id a 0.
Avant de commencer a saisir des nouveaux éléments.
Merci de votre aide
Niko
My Visual Database → General → Faire revenir Id a 0
Bonjour a Tous
J'ai besoin de votre aide
Apres avoir effacé le contenu d'une base je voudrai faire revenir Id a 0.
Avant de commencer a saisir des nouveaux éléments.
Merci de votre aide
Niko
Hi,
I'm guessing that you mean that you want to delete the contents of a table rather than the database (if you delete the entire database, all the IDs in the new database will start at 0 anyway).
If so, then after you have deleted the contents of your table, add this to your code;
sqlexecute('delete from sqlite_sequence where name = "mytablename"');
If, however, you DO want to delete the entire database, I would do it using a batch file that runs when your program closes.
Not sure why you need to do either?
Derek.
Hi Nikomax, hi Derek
OR
UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME='table_name';
Bonjour Derek Bonjour moineau
Merci de votre aide, j'ai compris la différence des deux.
Niko
My Visual Database → General → Faire revenir Id a 0
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi