On Fri, 05 Sep 2008, Juan Gálvez wrote: Hi Juan,
> I have a situation with a CUSTOM tag that contains KEY and FOR clause. > I think it's a normal situation that OrdKeyAdd() / OrdKeyDel() don't work > if the record doesn't respect the FOR clause. > When a valid record is modified and it stops to be valid for the FOR clause > ... Should not it be automatically eliminated of the CUSTOM tag ? No, it shouldn't. Custom indexes have to be updated manually by user respecting because only user can fully control their synchronization with database. RDD only makes synchronization with other index writes to avoid index corruption. In OrdKeyDel() the FOR clause is also respected and if it does not pass the condition then DBFCDX refuse key deletion. The custom flag is not revertible. Once set it cannot be changed. It's CL53CDX and COMIX compatible behavior which is different then SIX3 and EMPTY indexes. There are also some other differences, f.e. see DBOI_MULTIKEY flag. In SIX3 the same key value with the same associated record can be added more then once to the index. SIX3 has also concept of template indexes. Unfortunately CDX header flags does not allow to introduce all states so in SIX3 a hack with index key function name was used to indicate this state. All flags are supported by NSX and I implemented them in Harbour DBFNSX driver (probably I'll commit it soon). I also extended NTX driver in Harbour and it supports all these features and many others. With the exception to dynamic unique indexes it has everything what exists in DBFCDX also structural and multi tag indexes or hidden respecting RECNO as part of index key what resolves the problem with bad NTX performance with many repeated key values. It also supports features which are not present in DBFCDX, f.e. large file support up to 4GB (not 4MB), all index temperature states and different custom index versions. All is controlled by DBOI_* interface. DBFNSX also supports them. I have to much other pending jobs now but if I'll find some spare time then I'll rewrite DBFCDX again to clean the code and add some missing functionality. best regards, Przemek ps. I'll be absent for weekend. _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour