Hi everybody,
after only 30 years of programming in clipper, VO and x# I have a beginner's question:
Is there a simply way to determine, if the current record is part of a conditional index, maybe even with scopes set ?
I used (orderkeyno()<>0) so far, but this gets extremely slow with big tables.
TIA
Karl
is record in index
Re: is record in index
Karl,
You can get the index condition and macro compile and evaluate it
And then you can get the index key value and the current top and bottom scopes and compare that value with the current scopes (if any)
- DbOrderInfo(DBOI_CONDITION) for the condition
- DbOrderInfo(DBOI_KEYVAL) for the current keyvalue
- DbOrderInfo(DBOI_SCOPEBOTTOM) and DbOrderInfo(DBOI_SCOPETOP) for the scopes
see https://www.xsharp.eu/runtimehelp/html/ ... erInfo.htm for other possible DBOI_ values
Robert
You can get the index condition and macro compile and evaluate it
And then you can get the index key value and the current top and bottom scopes and compare that value with the current scopes (if any)
- DbOrderInfo(DBOI_CONDITION) for the condition
- DbOrderInfo(DBOI_KEYVAL) for the current keyvalue
- DbOrderInfo(DBOI_SCOPEBOTTOM) and DbOrderInfo(DBOI_SCOPETOP) for the scopes
see https://www.xsharp.eu/runtimehelp/html/ ... erInfo.htm for other possible DBOI_ values
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
Re: is record in index
Hi Robert,
that's exactly what I intended to do after the customer has complained about performance.
I just wondered whether there is a (maybe hidden) method/function for this i didn't know about...
Karl
that's exactly what I intended to do after the customer has complained about performance.
I just wondered whether there is a (maybe hidden) method/function for this i didn't know about...
Karl