Hi,

Index is not created due to invalid index key expression: ""
Current DBFCDX detects it and do not create index but RT
error is not generated. Clipper does not validate key expression.
I do not remember why exactly we added stringed key expression
validation but it was done in last few months.
We can add RT error or remove this validation.
I'll add this RT error. It should help in finding bugs in code.
If someone will have serious reasons to remove it then we can
disuse about it.

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.

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.


Regards,
Mindaugas

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to