| The library in this download is fully functional, 15-day
trial version; the days don't have to be consecutive, so if you try a function on Monday,
and then again on the following Thursdaythat's only two days used up. You'll see a
reminder screen the first time any function in the library is used in a given DfW session. Download
the zip file to a temporary directory, unzip it, and read the manual for instructions on
installing and using the library.
What does it do?
This library is a collection of seven functions to create, maintain, call/return
unique sequential numbers or patterns from values stored in a file external to
DataEase. The library addresses some shortcomings in DataEases sequence from operator (especially
on networks) as well as some problems with the SetUneek()
and GetUneek() functions from the CDFS2 library that
ships with DataEase.
The unique values can be numeric or a pattern (like a license
platee.g., AAA-001, AAA-002...).
The functions allow you to:
- Create the external file with an initial value.
- Change the current value of the key in order to restart the numbering sequence
- Read the current value of the key.
- Increment the current value by designer-specified amount.
What functions are in the library?
| FUNCTION LIST |
| Function Name |
What It Does |
| Sequential Number Functions |
| wizSetUnique |
Creates or resets a numeric sequence control
file. |
| wizSetUniqueExt() |
Creates or resets a numeric sequence control
file with more detailed error messages. |
| wizGetUnique() |
Retrieves the current value from a numeric
sequence control file and increments the file value by user-specified amount. |
| Sequential
Pattern Functions |
| wizSetPattern() |
Creates or resets a pattern sequence control
file. |
| wizSetPatternExt() |
Creates or resets a pattern sequence control
file with more detailed error messages.. |
| wizGetPattern() |
Retrieves the current value from a pattern
sequence control file and increments the file value by user-specified amount. |
| wizWhatIsPatternValue() |
Retrieves the current value from a pattern
sequence control file (e.g., tells you what the next sequence number will be). |
What's wrong with Sequence From?
DataEase has a built-in automatic sequence feature via its sequence
from keyword for numeric string fields. However, sequence from was
never intended to generate unique numbers, especially on a network, and especially when
subform records are involved.
A sequence from value is generated by DataEase keeping track of the last
record in a table, and adding one to the sequence from item every time a new
record is saved. If two people are entering records at the same time, the numbers can get
crossed up depending on who presses the Save key first, leading to all sorts of problems.
You can avoid these problems by changing your data-entry routines to ones that use DQL
procedures instead of direct entry so that the key number is assigned in this way, and
using a native DataEase table to keep track of the numbers. Or you can use a CDF as part
of a field derivation and make life much easier for yourself.
SetUneek & GetUneek (CDFS2)
There's nothing wrong with the CDFS2 librarys SetUneek() and
GetUneek() combinationif you are running on a Novell network or an NT-based network
with low-to-medium data-entry concurrency.
John Middleton, (from ShopEase.com) who has developed a POS system in DataEase (DOS and Windows versions)
found a problem with multi-user tests of SetUneek() and GetUneek() where the control
file would get caught in the cache of an NT server and duplicate numbers would
be issued. With DataEase 5.5 and the 16-bit version of CDFS2, he said it was very
easy to produce a duplicate value. His testing with DataEase 6.0 and the 32-bit
version of CDFS2 resulted in 3 duplicate numbers being generated over several hours out of
30,000 transactionswhich is not bad. wizUnique did not generate any
duplicate numbers during the same test. |