Antonio,
I dont have incremental search in my xbrowse.
Could email me only that function?
lucas.prg(331) Warning W0001 Ambiguous reference 'UR_FI_FLAGS'
lucas.prg(332) Warning W0001 Ambiguous reference 'UR_FI_STEP'
#define UR_FI_FLAGS 6
#define UR_FI_STEP 7
#define UR_FI_SIZE 7 //eram 5 ahf
IF UPPER(SUBSTR(cOrder,1,3)) IN aTempFiles .OR. UPPER(SUBSTR(cOrder,1,4)) IN aTempFiles
STATIC FUNCTION ADOSCOPE(aWAdata, oRecordSet, aOrderInfo,nIndex)
LOCAL y, cScopeExp :="", cSql :=""
//[UR_ORI_NEWVAL] comes with actual scope top or bottom and returns the former active scope if any
IF VALTYPE(aOrderInfo[ UR_ORI_NEWVAL ]) = "B"
aOrderInfo[ UR_ORI_NEWVAL ] := EVAL(aOrderInfo[ UR_ORI_NEWVAL ])
ENDIF
IF EMPTY(aWAdata[WA_INDEXACTIVE]) .OR. aWAdata[WA_INDEXACTIVE] = 0 //NO INDEX NO SCOPE
aOrderInfo[ UR_ORI_RESULT ] := NIL
RETURN HB_FAILURE
ENDIF
y:=ASCAN( aWAData[ WA_SCOPES ], aWAData[WA_INDEXACTIVE] )
DO CASE
CASE nIndex == DBOI_SCOPESET //never gets called noy tested might be completly wrong!
IF y > 0
aWAData[ WA_SCOPETOP ][y] := aOrderInfo[ UR_ORI_NEWVAL ]
aWAData[ WA_SCOPEBOT ][y] := aOrderInfo[ UR_ORI_NEWVAL ]
ELSE
AADD( aWAData[ WA_SCOPES ],aWAData[ WA_INDEXACTIVE ])
AADD(aWAData[ WA_SCOPETOP ],aOrderInfo[ UR_ORI_NEWVAL ])
AADD(aWAData[ WA_SCOPEBOT ],aOrderInfo[ UR_ORI_NEWVAL ])
ENDIF
aOrderInfo[ UR_ORI_RESULT ] := NIL
CASE nIndex == DBOI_SCOPECLEAR //never gets called noy tested might be completly wrong!
IF y > 0
ADEL(aWAData[ WA_SCOPES ],y,.T.)
ADEL(aWAData[ WA_SCOPETOP ],y,.T.)
ADEL(aWAData[ WA_SCOPEBOT ],y,.T.)
ENDIF
aOrderInfo[ UR_ORI_RESULT ] := NIL //RETURN ACUTAL SCOPETOP NIL IF NONE
CASE nIndex == DBOI_SCOPETOP
IF y > 0
aOrderInfo[ UR_ORI_RESULT ] := aWAData[ WA_SCOPETOP ][y] //RETURN ACTUALSCOPE TOP
aWAData[ WA_SCOPETOP ][y] := aOrderInfo[ UR_ORI_NEWVAL ]
IF LEN(aWAData[ WA_SCOPEBOT ]) < y
AADD(aWAData[ WA_SCOPEBOT ],SPACE(LEN(CVALTOCHAR(aWAData[ WA_SCOPETOP ][y])))) //THERE INST STILL A SCOPEBOT ARRAYS MUST HAVE SAME LEN
ENDIF
ELSE
AADD(aWAData[ WA_SCOPETOP ],aOrderInfo[ UR_ORI_NEWVAL ])
AADD(aWAData[ WA_SCOPEBOT ],SPACE(LEN(CVALTOCHAR(aWAData[ WA_SCOPETOP ][1])))) //THERE INST STILL A SCOPEBOT ARRAYS MUST HAVE SAME LEN
aOrderInfo[ UR_ORI_RESULT ] := ""
ENDIF
CASE nIndex == DBOI_SCOPEBOTTOM
IF y > 0
aOrderInfo[ UR_ORI_RESULT ] := aWAData[ WA_SCOPEBOT ][y] //RETURN ACTUALSCOPE TOP
aWAData[ WA_SCOPEBOT ][y] := aOrderInfo[ UR_ORI_NEWVAL ]
IF LEN(aWAData[ WA_SCOPETOP ]) < y
AADD(aWAData[ WA_SCOPETOP ],SPACE(LEN(CVALTOCHAR(aWAData[ WA_SCOPEBOT ][y])))) //THERE INST STILL A SCOPETOP ARRAYS MUST HAVE SAME LEN
ENDIF
ELSE
AADD( aWAData[ WA_SCOPES ],aWAData[ WA_INDEXACTIVE ])
AADD(aWAData[ WA_SCOPEBOT ],aOrderInfo[ UR_ORI_NEWVAL ])
AADD(aWAData[ WA_SCOPETOP ],SPACE(LEN(CVALTOCHAR(aWAData[ WA_SCOPEBOT ][1])))) //THERE INST STILL A SCOPETOP ARRAYS MUST HAVE SAME LEN
aOrderInfo[ UR_ORI_RESULT ] := ""
ENDIF
CASE nIndex == DBOI_SCOPETOPCLEAR
IF y > 0
aOrderInfo[ UR_ORI_RESULT ] := aWAData[ WA_SCOPETOP ][y] //RETURN ACTUALSCOPE TOP
aWAData[ WA_SCOPETOP ][y] := SPACE(LEN(CVALTOCHAR(aWAData[ WA_SCOPEBOT ][y])))
ELSE
aOrderInfo[ UR_ORI_RESULT ] := "" //RETURN ACTUALSCOPE TOP IF NONE
ENDIF
CASE nIndex == DBOI_SCOPEBOTTOMCLEAR
IF y > 0
aOrderInfo[ UR_ORI_RESULT ] := aWAData[ WA_SCOPEBOT ][y] //RETURN ACTUALSCOPE TOP
aWAData[ WA_SCOPEBOT ][y] := SPACE(LEN(CVALTOCHAR(aWAData[ WA_SCOPETOP ][y])))
ELSE
aOrderInfo[ UR_ORI_RESULT ] := "" //RETURN ACTUALSCOPE TOP IF NONE
ENDIF
ENDCASE
//ONLY BUILDS QUERY AFTER ALL DONE ASSUME THAT ALWAYS CLLED IN PAIRS OTHERWISE WILL GET ERROR
IF nIndex = DBOI_SCOPEBOTTOM .OR. nIndex = DBOI_SCOPEBOTTOMCLEAR .OR. nIndex = DBOI_SCOPETOPCLEAR
IF y = 0 //IF DIDNT FOUND ANY ITS THE FIRST ONE THAT JUST BEEN ADD
y := 1
ENDIF
IF LEN(ALLTRIM(aWAData[ WA_SCOPETOP ][y]+aWAData[ WA_SCOPEBOT ][y])) > 0
cScopeEXp := ADOPSEUDOSEEK(aWAData[ WA_SCOPETOP ][y],aWAData,,.T.,aWAData[ WA_SCOPEBOT ][y])[2]
ELSE
cScopeExp :=""
ENDIF
cSql := IndexBuildExp(aWAData[ WA_INDEXACTIVE ],aWAData,,cScopeExp)
oRecordSet:Close()
oRecordSet:open(cSql,aWAData[ WA_CONNECTION ])
ENDIF
RETURN HB_SUCCESS
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 97 guests