Posted – 28/08/2006 :  14:44:10

 

How come i cannot make a column which is set to Auto Data Entry Type of “Auto Line Number” as a KEY Column ? Thought this would be a valid option ? being that this will always be unique.

———————-
David Herries
Forum Moderator
Interpine Forestry

Posted – 29/08/2006 :  03:13:43

 

Hello, David-

Auto Line Number was prohibited from use with key columns, because it could potentially be quite non-unique. Consider collecting data in multiple datasets, or even two hand-helds using a single dataset. Those auto line number values would be the same across datasets or hand-helds, so at merge time you could end up with duplicate key values.

In addition, let’s say for example you have a 3-level application and you had records (auto line numbers) 1, 2, 3 in your level 1 branch. Let’s say you had collected data for levels 2 and 3 for all level 1 records. Now let’s say you go to level 1, record 2, and delete it. The program would have to traverse every child file of what used to be record 3 and alter the data in their key columns from 3 to 2. When DataPlus was developed, the existing DOS hand-helds didn’t seem up to this task, which could be quite time consuming (particularly if you deleted an early line number in a level 1 file that had a good deal of records).

One way to get around this would be to not use key columns at data collection time, use the Auto Line Number if desired, then set your conversion up to make the column with Auto Line Number a key. Therefore, the key column’s data is replicated to child branches at conversion time and you can still use Auto Line Number at data collection time.

Beware however of the above concerns.

—————-
Mike Duppong
Forum Moderator
Electronic Data Solutions