On Thu, 29 Jan 2009, Mindaugas Kavaliauskas wrote: Hi,
> Yes, I think we had no problem with some Harbour version in the past. Now > the problem is: what should we put into key expression, if indexing should > be done using codeblock? Using NIL parameter for key expression generates > run time error. Please note that this can be used only for temporary indexes. When index is reopened then it needs valid key and for expressions. It means that we create corrupted indexes in such way. > In DBFCDX block has a kind of priority - index is generated using > codeblock, and key expression is used only for storing key in .cdx files > (temporary .cdx files in this case). But the situation is opposite in ADSX > RDD. Key expression is passed to the server, and if server is unable to > solve that expression, ADSX creates local memory index using codeblock. > Solution to satisfy both DBFCDX and ADSX was simple: > OrdCreate(,, "", {|| ...key.block...}) > Now I have to do something like: > OrdCreate(,, "FUNC_UNKNOWN_FOR_ADS()", {|| ...key.block...}) > ... > FUNC FUNC_UNKNOWN_FOR_ADS() > RETURN SPACE(1) > to be expression valid for DBFCDX (even if it is not used for indexing), > and to be it invalid for ADS, thus forcing fallback to local indexing by > codeblock. I do not like such hacks because they are really RDD dependent. I'll unblock such possibilities in next commit but maybe we should allow to create such indexes only if temporary flag is set. Temporary indexes are automatically removed on close so we will not leave corrupted files. They are also open in EXCLUSIVE mode so other application will not be able to access them. best regards, Przemek _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour