fbpx
Welcome, Guest
Username: Password: Remember me
Visual Objects

Please use this forum to post questions about Visual Objects and Vulcan.NET
  • Page:
  • 1

TOPIC:

What could be the reasons for VODBUseArea() returning false ? 30 Apr 2021 08:20 #18254

  • ArunBerlin's Avatar

  • ArunBerlin

  • Topic Author


  • Posts: 5
  • FUNCTION _DictOpen(pszDictName AS PSZ,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 := Psz2String(pszDictName) + ".DBZ"
       cAlias := "__" + Str(100000 + VODBSetSelect(0),6,0)
    
          strRDDList := GetRDDList()
          IF VODBUseArea(TRUE, strRDDlist, cFile, cAlias, (nShare == 1), (nRO == 1)) .and. !NetErr()
             nRet := (cAlias)->(VODBGetSelect())
          ENDIF
    RETURN nRet
    
    INTERNAL FUNCTION GetRDDList() AS _RDDLIST
        Local X_RDDMAIN := #DBFNTX 
       LOCAL strRDDList AS _RDDLIST
       LOCAL DIM aRDDNames2[2] AS STRING
       LOCAL DIM aRDDNames3[3] AS STRING
       LOCAL dwRDDs AS DWORD
    
       aRDDNames2[1] := "CAVODBF"
       aRDDNames2[2] := X_RDDMAIN
       strRDDList := _RDDList{aRDDNames2}
    
    RETURN strRDDList

    pszDictName contains full path of the file but VODBUseArea is always returning false. What could be the reasons ? How can I debug it ?

    Please Log in or Create an account to join the conversation.

    What could be the reasons for VODBUseArea() returning false ? 30 Apr 2021 09:49 #18255

  • Chris's Avatar

  • Chris


  • Posts: 2495
  • Hi Arun,

    You can call _VoDbErrInfoPtr(), this will return an Exception object for the last error that happened, if there was any, it should give you all the info you need. Try _VoDbErrInfoPtr():Message first maybe.
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    What could be the reasons for VODBUseArea() returning false ? 30 Apr 2021 10:04 #18256

  • ArunBerlin's Avatar

  • ArunBerlin

  • Topic Author


  • Posts: 5
  • Got the error "Could not find file 'File.DBT".
    Yeah, DBT file is missing in the path. But I'm expecting to open a DBZ file, as per the code. Is there any way to open .DBZ files ?

    Please Log in or Create an account to join the conversation.

    What could be the reasons for VODBUseArea() returning false ? 30 Apr 2021 13:55 #18257

  • Chris's Avatar

  • Chris


  • Posts: 2495
  • Hi Arun,

    What is the dbz file format? I searched for it but only found references for a compressed file format which does not seem to be relevant to xBase, or am I wrong about this?

    Or are your files regular .dbf files that simply use the .dbz extension? In that case, I think your dbf includes a memo field, is that right? So you get the error when trying to open the .dbt file for this memo.
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    What could be the reasons for VODBUseArea() returning false ? 30 Apr 2021 14:40 #18258

  • ArunBerlin's Avatar

  • ArunBerlin

  • Topic Author


  • Posts: 5
  • No, DBZ is a different kind of files containing pointer values to the DBV (Memo files). The problem is solved. I missed some RDD drivers related to working with DBV and DBZ files. Thankyou Chris for your replies

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1