The only function that is critical to get us around this problem at this stage is the equivalent of the dBase (VFP) TYPE() function which returns the data type of the value being passed. We use this in index expressions and this is causing HTTX DBF to throw an error.
As we do not actually use these indexes in the application HTTX is being used for, perhaps you could ignore the error and let use open the tables anywhere. In fact, the application only uses HTTX for reading and not writing at all.
Currently, we have set the parameter to tell HTTX to not use indexes to speed up things but it would be better if it could.
I have purchased HTTX today and look forward to receiving my licence and a possible resolution to this issue.
>In the example below, we have INVNUMBER.FXP and INVNUMBER.PRG existing in the
>table directory but this is being ignored.
>How can we get around this problem?
Extend SQL functions at here. HXTT DBF can't run Foxpro code since it's not a Foxpro runtime.
>I have bypassed this by using the loadIndices=false parameter but would like
>to enable indexes to speed up performance.
What's your sql which you want to run in Java code?
>you do not support a critical foxpro function which is TYPE and this is
>a standard XBASE function..
If those functions are critical for your project, we can complement it.
v4.2.038 supports TYPE(cExpression) and VARTYPE(expression). It will be availabe after about 2 hours.
I progressed past the TYPE error but now it is complaining about the EVALUATE function.
This is my index expression:
INDEX ON IIF(TYPE("invoices.invnumber")="N",EVALUATE('invoices.invnumber'),0) TAG invnumber
What is supposed to happen with IIF is that it shoudl evaluate the first paramter if True, otherwise the 2nd.
In our case, the invoices table is nto open and TYPE("invoices.invnumber") is False so it should return 0 and ignore the first parameter but in your case, you are not ignoring it.
Solution is to either implement the EVALUATE function or ignore the 1st parameter alltogether if IIF returns false and ignore the 2nd if it returns True.
Oh and I forgot to thank you for your quick response last time.
>and ignore the first parameter but in your case, you are not ignoring it.
Because HXTT DBF will precompile your index expression, and do necessary check. v4.2.040 supports EVALUATE(cExpression). It will be available after about 3 hours.