TPS file duplicate key error 
Author Message
 TPS file duplicate key error

Hi all

I have a TPS file created by a program developed in CW2.0
I am able to browse this file in CW2.0, however when I tried to browse
the file in Clarion4 the files opens OK but when I change the order to
the key order and press page down, I get the error record not available.

I ran the Topspeed's file recovery utility (provided with Clarion4) it
does not give any errors during the scan phase but gives an error 'Build
of keys failed due duplicate keys being generated'. If I run the same
using Topspeed's file recovery program provided with CW2 there are no
errors at all.

The file is rather large to check manually whether there are dup
records, can anyone guide me as to what may have gone wrong.

Thanks in advance

SB

  vcard.vcf
< 1K Download


Sat, 10 Nov 2001 03:00:00 GMT  
 TPS file duplicate key error
Sham

Unfortunately,  this is a serious problem with the TPS recovery process. TS
has designed the TPS format in such a manner that when a duplicate key
occurs (whether by accident or data corruption), it is the developer's
responsibility to fix the offending record causing the duplicate key error.
CW2 probably had the same issue but it didn't tell you the actual error
message... just stopped rebuilding the file once it encountered the
duplicate key.

In other words, you cannot rebuild your keys or use any TS recovery tool to
remove the record that is causing the duplicate key error.  You will have to
write your own routine to delete the offending record.  I have mentioned
this to TS on more than one occassion... stating that TPSFIX should be able
to remove the duplicate record or at least continue with the Building of the
keys and report a duplicate key log file like the Clarion file format does.

Doug


Quote:
> Hi all

> I have a TPS file created by a program developed in CW2.0
> I am able to browse this file in CW2.0, however when I tried to browse
> the file in Clarion4 the files opens OK but when I change the order to
> the key order and press page down, I get the error record not available.

> I ran the Topspeed's file recovery utility (provided with Clarion4) it
> does not give any errors during the scan phase but gives an error 'Build
> of keys failed due duplicate keys being generated'. If I run the same
> using Topspeed's file recovery program provided with CW2 there are no
> errors at all.

> The file is rather large to check manually whether there are dup
> records, can anyone guide me as to what may have gone wrong.

> Thanks in advance

> SB



Sat, 10 Nov 2001 03:00:00 GMT  
 TPS file duplicate key error
To add to what Doug wrote...

Create a conversion program, just a simple convert in place program. I
assume you know how to do this from the Dictionary.

Then modify the code to use ADD, instead of APPEND. If ADD posts an
ERRORCODE 40, then you can display the record, showing the duplicate key.
You can CYCLE to simply bypass the duplicate record or whatever you decide
should be done. If there are any child records, you can bypass them too if
necessary.

HTH.

Bob.



Sat, 10 Nov 2001 03:00:00 GMT  
 TPS file duplicate key error

Thanks Bob

Your suggestion is just the cure I needed.

Quote:

> To add to what Doug wrote...

> Create a conversion program, just a simple convert in place program. I

> assume you know how to do this from the Dictionary.

> Then modify the code to use ADD, instead of APPEND. If ADD posts an
> ERRORCODE 40, then you can display the record, showing the duplicate
> key.
> You can CYCLE to simply bypass the duplicate record or whatever you
> decide
> should be done. If there are any child records, you can bypass them
> too if
> necessary.

> HTH.

> Bob.

  vcard.vcf
< 1K Download


Sun, 11 Nov 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Duplicate Key Problem with TPS File

2. Duplicate key error

3. Auto increment Error: Creates Duplicate Key (40)

4. Duplicate Key Errors using PrimeAutoInc() (C5EEB)

5. Duplicate Key error with Tpsfix in C5 Professional

6. Duplicate Key error with Tpsfix in C5 Professional

7. "creates duplicate key" error

8. Error 40 Create Duplicate Key

9. Error #40 - Duplicate Key-entry

10. CW4 Duplicate key error

11. Duplicate error on string key

12. Duplicate key error when canceling addition of a record

 

 
Powered by phpBB® Forum Software