VODBAppend() returns false
Posted: Wed Aug 17, 2022 3:18 pm
Code: Select all
LOCAL nRet := 1 AS LONG
nRet := iif((nArea)->(VODBAppend(TRUE)) .and. !NetErr(),1,0)
Code: Select all
FUNCTION _DictCreate(pszDictName AS PSZ) AS LONG PASCAL
LOCAL cFile AS STRING
LOCAL aStruc AS ARRAY
LOCAL strRDDList AS _RDDLIST
LOCAL nRet := 0 AS LONG
SetAnsi(FALSE)
SetCollation(#CLIPPER)
SetDateCountry(XSharp.Core.Functions.BRITISH)
SetCentury(TRUE)
cFile := Psz2String(pszDictName) + '.DBZ' // Index file
strRDDList := GetRDDList()
aStruc := {{"DATA","M",10,0}}
IF VODBCreate(cFile, aStruc, strRDDList, TRUE, "blob", NULL_STRING, FALSE, FALSE)
nRet := 1
ENDIF
RETURN nRet
FUNCTION _DictOpen(pszDictName AS STRING,nShare AS LONG,nRO AS LONG) AS LONG PASCAL
LOCAL cFile,cAlias AS STRING
LOCAL strRDDList AS _RDDLIST
LOCAL nRet := 0 AS LONG
SetAnsi(FALSE)
SetCollation(#CLIPPER)
SetDateCountry(XSharp.Core.Functions.BRITISH)
SetCentury(TRUE)
cFile := UPPER(pszDictName) + '.DBZ' // Index file
cAlias := "__" + Str(100000 + VODBSetSelect(0),6,0)
strRDDList := GetRDDList()
IF VODBUseArea(TRUE, strRDDlist, cFile, cAlias, TRUE, TRUE) .and. !NetErr()
nRet := (cAlias)->(VODBGetSelect())
ENDIF
RETURN nRet
INTERNAL FUNCTION GetRDDList() AS _RDDLIST
LOCAL strRDDList AS _RDDLIST
LOCAL DIM aRDDNames2[2] AS STRING
LOCAL DIM aRDDNames3[3] AS STRING
LOCAL dwRDDs AS DWORD
dwRDDs := iif(Empty(NULL_SYMBOL), 2, 3)
IF dwRDDs == 3
aRDDNames3[1] := "CAVODBF"
aRDDNames3[2] := #DBFNTX
aRDDNames3[3] := NULL_SYMBOL
strRDDList := _RDDList{aRDDNames3}
ELSE
aRDDNames2[1] := "CAVODBF"
aRDDNames2[2] := #DBFNTX
strRDDList := _RDDList{aRDDNames2}
ENDIF
RETURN strRDDList
What could be the reasons for VODBAppend() returning always false ?nRet is returning 0, eventhough the nArea(LONG) is having a valid handle (2) of DBT file opened.