Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 5 of 5 total |
# 9729 Duplicate key found |
Sat, Aug 2 2008 10:58 AM | Permanent Link |
"Norbert Stellberg" | Hello,
In my table comes now this message: DBISAM Engine Error # 9729 Duplicate key found in the index 'Primary' of the table 'AuftragKopf'. What can I do ? Please help. ...----... with best regards Norbert |
Sat, Aug 2 2008 11:21 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Norbert
At this point the best you can do is a table repair either via the table methods or via sql. That sorts it out for now. For the future try and figure out what caused it and stop it The other thing is to add an OnPostError handler or something like try table.post except .... end;/ In my EMail & NewsReader app I have an occasional problem caused, I think, by timing with background threads. This bit adds email addresses to my blacklist for the spam that fails the baysian filter. Every so often I get one of these. All I do is cancel the Post in a try except block since I don't really care in this case. If yours is more important data I'd recommend writing out a log file as well. Roy Lambert [Team Elevate] |
Sat, Aug 2 2008 11:27 AM | Permanent Link |
Fernando Dias Team Elevate | Norbert,
This exception is raised when an attempt is made to add a duplicate primary key value. Are you sure you are not trying to add a duplicate value? If you are sure then maybe the table or index (or both) are corrupt. You can verify and repair a table and rebuild the indexes using the "VerifyTable" and "RepairTable" methods of the TDBISAMTable component or REPAIR TABLE SQL statement. You can find more information about this in the manual, at: http://www.elevatesoft.com/manual?action=mantopic&id=dbisam4&product=b&version=2006&category=1&topic=23 -- Fernando Dias [Team Elevate] |
Sat, Aug 2 2008 12:52 PM | Permanent Link |
"Norbert Stellberg" | Hello Roy,Fernando,
thank you very much for Your fastest help. Ok. I have now made a button for repair and a try and except block. But, why comes this error. The error means, there is a duplicate index in the primary index. Is this a normaly message or must I made any changes in my program ? - What I miss in DBISAM is a simple example program with any features of DBISAM. I am a DBISAM newby and a lot of functions are unknown for me. I never programmed a SQL databse. Since 2-3 weeks I use DBISAM. It is a very grand toll. But for a beginner it is a little bit difficult. :=) - Therefore, sorry for my simple questions and thanks a lot for your fastest help. with best regards Norbert |
Sat, Aug 2 2008 1:47 PM | Permanent Link |
Fernando Dias Team Elevate | Norbert,
Under normal circumstances, it should only happen if you try to insert a duplicate value for the primary key. That's normal and that's exactly the function of a primary index - it prevents the insertion of duplicate keys in the table. If you get the error #9729 under different circumstances, then it's not normal and it may mean that the index or the table is damaged for some reason and must be repaired. DBISAM is very robust and corruption is not frequent, but as with any database it can happen, mainly in file-sharing mode. The most frequent cause is an unexpected shutdown while the table or the index is being written because, for example, of a power failure. -- Fernando Dias [Team Elevate] |
This web page was last updated on Friday, April 19, 2024 at 07:09 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |