Results 1 to 7 of 7

Thread: Three identical records with same recnum?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Posts
    750

    Default Three identical records with same recnum?

    I ran into a curious database problem. It looks like there are 3 identical records with the same Recnum in an embedded database file. Besides, there are two additional fields connected to unique indexes. One of these is an alphanumeric item number, ARTKOD. If that column is focused in a selection list, three identical lines are shown, but if I focus another column, only one line is shown. Also, if I loop through the file by the ARTKOD index, I get three identical records. I re-indexed, but nothing was changed. Database Explores show the same, se Recnum 474902 in the attached pictures. How can it be like this?

    Bengt

    Click image for larger version. 

Name:	db1.png 
Views:	61 
Size:	99.7 KB 
ID:	13281Click image for larger version. 

Name:	db2.png 
Views:	59 
Size:	97.1 KB 
ID:	13282

  2. #2
    Join Date
    Feb 2009
    Location
    South Florida
    Posts
    3,861

    Default Re: Three identical records with same recnum?

    generally a bad index. sort them by recnum and the dupes should go away
    Michael Salzlechner
    StarZen Technologies, Inc
    http.://www.starzen.com

    Development Blog
    http://www.salzlechner.com/dev

    DataFlex Package Manager (aka Nuget for DataFlex)
    http://windowsdeveloper.com/dfPackage

  3. #3
    Join Date
    Feb 2009
    Location
    South Florida
    Posts
    3,861

    Default Re: Three identical records with same recnum?

    delete the index files before reindex
    Michael Salzlechner
    StarZen Technologies, Inc
    http.://www.starzen.com

    Development Blog
    http://www.salzlechner.com/dev

    DataFlex Package Manager (aka Nuget for DataFlex)
    http://windowsdeveloper.com/dfPackage

  4. #4
    Join Date
    Feb 2009
    Posts
    750

    Default Re: Three identical records with same recnum?

    I used the old VdfSort which I have built into my program. When I re-indexed with Database Builder instead, the duplicates disappeared even without deleting the index files.

  5. #5
    Join Date
    Sep 2016
    Location
    São Paulo - Brazil
    Posts
    294

    Default Re: Three identical records with same recnum?

    Pay attention to colate.cfg. . .

    The old program must be using a different one.

    Example:

    If during DF installation I chose to use the language: English

    and

    If my program, which contains the DFSort command, is using a Colate.cfg = Portuguese,

    Clearly, this symptom occurs.

    If I index through DBBuilder, DbExplorer shows all ok but not in my program.

    If I index by my program, the reverse occurs.

    Therefore, I install DF with colate.cfg = Portuguese, which is best suited for me, using the same colate.cfg in my program (client dataflex).

    Regards,

  6. #6
    Join Date
    Feb 2009
    Location
    South Florida
    Posts
    3,861

    Default Re: Three identical records with same recnum?

    shouldnt get a record twice in an index no matter what collate cfg you are using. the sort order could be different but each record should only show once
    Michael Salzlechner
    StarZen Technologies, Inc
    http.://www.starzen.com

    Development Blog
    http://www.salzlechner.com/dev

    DataFlex Package Manager (aka Nuget for DataFlex)
    http://windowsdeveloper.com/dfPackage

  7. #7
    Join Date
    Feb 2009
    Location
    South Florida
    Posts
    3,861

    Default Re: Three identical records with same recnum?

    i am guessing if you run the vdfsort again its probably good now. Possibly dbbuilder deletes the index file first
    Michael Salzlechner
    StarZen Technologies, Inc
    http.://www.starzen.com

    Development Blog
    http://www.salzlechner.com/dev

    DataFlex Package Manager (aka Nuget for DataFlex)
    http://windowsdeveloper.com/dfPackage

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •