Subject Re: Record lock for unique #
From <rich@autotraker.com> <<rich@autotraker.com>>
Date Mon, 25 Mar 2019 11:19:21 -0400
Newsgroups dbase.getting-started

I have switched from using a common table to keep track of sequential
numbers to using a common INI file.
The speed at which Windows can open and update a INI file is lightning
compared to opening and updating a table.
No record locking involved, Windows handles everything.
As a bonus by editing the INI file with a simple text editor, I can change
the stored value very easily.
I use my own read/write INI routines but you can use the INI.cc from the
dUFLP

set procedure to :dUFLP:Ini.Cc additive
oMyINI = new INI(set("dire")+"\Podium.ini")
key_no = val(oMyIni.GetValue([Config],[key_no]))+1
? key_no
oMyIni.SetValue([Config],[key_no],key_no)
oMyIni.Flush()
oMyIni.Release()
close proc :dUFLP:Ini.Cc

Rich...




"Randy Waldman"  wrote in message news:qZ87mFr3UHA.2848@ip-AC1E04A7...

Plus 12 user.  Several users on same program.  Each one has to frequently
grab a unique sequential # from a common table.  Do I need to code a "record
lock" or will dBase take care of (possibility of dupes) on its own?  Thanks,
Randy