Re: EDS Autonumber
- Posted by petelomax at fastmail.fm Dec 02, 2005
- 536 views
On Thu, 01 Dec 2005 15:09:11 -0800, "Alex Chamberlain" <guest at RapidEuphoria.com> said: > Has anyone got a way of generating an autonumber under the native eds > system? In Edita, I just use db_table_size(), never delete any records in the main program, and have a separate standalone utility which runs in single-user=20 mode and looks for items which ought to be deleted (in this case source files and directories which no longer exist and have no backups). If it finds any it=20 loops through the whole db replacing <high> with <first unused slot>. A simpler (but slower) way is just to have a separate record which contains a counter and is rewritten every time you add a record. You could reduce the overhead by adding say 10 to the counter, and then the next 9 record adds do not need to rewrite the counter record, and possibly release any unused slots on successful program shutdown. Regards, Pete -- =20=20 petelomax at fastmail.fm -- http://www.fastmail.fm - Same, same, but different=85