What could be the reasons for VODBUseArea() returning false ?

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
Post Reply
ArunBerlin
Posts: 33
Joined: Tue Oct 27, 2020 1:19 pm
Location: India

What could be the reasons for VODBUseArea() returning false ?

Post by ArunBerlin »

Code: Select all

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 ?
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

What could be the reasons for VODBUseArea() returning false ?

Post by Chris »

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.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
ArunBerlin
Posts: 33
Joined: Tue Oct 27, 2020 1:19 pm
Location: India

What could be the reasons for VODBUseArea() returning false ?

Post by ArunBerlin »

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 ?
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

What could be the reasons for VODBUseArea() returning false ?

Post by Chris »

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.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
ArunBerlin
Posts: 33
Joined: Tue Oct 27, 2020 1:19 pm
Location: India

What could be the reasons for VODBUseArea() returning false ?

Post by ArunBerlin »

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
Post Reply