Antonio,
1. Is there a UR_FOR or similar in harbour\include\hbusrrdd.ch ?
As far as I see no.
3. In SQL we may need to store a string cFor value only, no need for the codeblock.
Its absolutly necessary to build the selects respecting indexes order and conditions.
If the index is created (temporary) then on ADO_CREATE we have all info we just save it for later use.
If the index its usual then it must be defined previously in the index array.
So the problem its only with ordfor() to get the values saved.
2. Have we implemented those functions in adordd.prg ?
What do you mean by those functions ?
I can have such a function(s) but then I will disrupt other linked rdds, besides that since we dont have nWA we can not use it like (alias)->(ordfor(2))
- Code: Select all Expand view
FUNCTION OrdFor(nOrder)
//works only for current selected workarea not alias->(ordfor(n))
LOCAL cTablename := USRRDD_AREADATA( Select() )[ WA_TABLENAME ]
LOCAL aWAData := USRRDD_AREADATA( Select() )
LOCAL cFor := ""
IF nOrder = 0
nOrder := aWAData[WA_INDEXACTIVE]
cFor := aWAData[WA_INDEXFOR][nOrder]
ELSEIF nOrder <= LEN(aWAData[WA_INDEXES] )
cFor := aWAData[WA_INDEXFOR][nOrder]
ENDIF
RETURN cFor
I think all mentioned functions must be defined at rdd level to be used correctly as they probably are in dbfcdx rdd for ex.
The adordd its working already with "indexes" with zero app code change and if you get an error you will have all area info.
- Code: Select all Expand view
20: ENCCLIST NomeRDD: ADORDD
==============================
RecNo RecCount BOF EOF
1 34 .F. .F.
Índices em uso TagName
=> NRENCOMEND+CODIGOPROD+ARMAZEM ENCCPRO
CODIGOPROD+ARMAZEM+NRENCOMEND PROENCC
GUIA+CODCLIENTE+CODIGOPROD+ARMAZEM MECPD
CODCLIENTE CDENCCL
NRFACTUR+CODCLIENTE+CODIGOPROD+ARMA PTFACT
NRFACTUR+CODIGOPROD+ARMAZEM+ANO +SE NRFPROD
CODIGOPROD+NRCONTRATO CCONTRT
Relações em uso
Registos fechados
30: => OFERTAS NomeRDD: ADORDD
==============================
RecNo RecCount BOF EOF
1 3 .F. .F.
Índices em uso TagName
CODCLIENTE+CODIGOPROD+ARMAZEM+DATAO CLIPRO
CODIGOPROD+ARMAZEM+CODCLIENTE+DATAO PROCLI
CODCLIENTE+DATAOFERTA +NUMEROOFER+C CLIPRO2
CODIGOPROD+ARMAZEM+DATAOFERTA +NUME PROCLI2
=> CODCLIENTE TEMP2
Relações em uso
Registos fechados
Dont get me wrong its not a matter of difficulty but if its in fact possible to work with our approach idea and that we are not simply loosing time as we are trying to join together two completly diferent worlds xBase and SQL.
Besides that we have till June to have such a solution.
Is there some rdd expert that could help us? How can we solve this? Can you check how its working in other rdds?