xBrowse error on version 18.05

xBrowse error on version 18.05

Postby ellano » Thu Aug 23, 2018 8:49 am

I just updated yesterday to Fivewin for Harbour 18.05 32 bits.
Using xBrowse I have this experience:
1. Borland 7.20 (or 5.82)+Fivewin 14.04 (the one I used until yesterday) no problem whatsoever
2. Borland 7.30 (or 7.20)+Fivewin 18.05 xBrowse closes one of the database (the main one) unexpectedly after the second call on a click event
Tested for several hours and I cannot find the problem so the problem definitively comes from Fivewin 18.05 since this is not happening on Fivewin 14.04 (several users have been using this program daily 8 hours a day every day for the last 4 years)
The code is a classic one in FiveWin:

Code: Select all  Expand view

      SELECT A
      SET ORDER TO TAG "A1"  
      SELECT B
      DEFINE DIALOG oConsulta RESOURCE "Browse_DBF" TITLE "show something" FONT oFuente
      REDEFINE BUTTON oBtn[1] ID 300 of oConsulta
      REDEFINE BUTTON oBtn[2] ID 301 of oConsulta
      DO CASE
      CASE cual=1  
        SET ORDER TO TAG "B1"
        REDEFINE XBROWSE oBrw ;
         FIELDS B->numbr,B->name,B->color, DTOC(B->bornDate);
         ID 101 HEADERS "Number","Name","Color", "Born" SIZES 110, 170, 200, 90;
         COLOR RGB(0,0,0),RGB(226,241,254) OF oConsulta FONT oFuente
         oBrw:aCols[1]:oDataFont := oFuente1
      CASE cual=2    
        SET ORDER TO TAG "B2"
        REDEFINE XBROWSE oBrw ;
         FIELDS DTOC(B->bornDate),B->numbr,B->name,B->color;
         ID 101 HEADERS "Born","Number","Name","Color"  SIZES 90, 110, 170,  200;
         COLOR RGB(0,0,0),RGB(240,240,166) OF oConsulta FONT oFuente
         oBrw:aCols[2]:oDataFont := oFuente1
      ENDCASE
      oBrw:aCols[4]:AddResource( 'ON' )
      oBrw:aCols[4]:AddResource( 'OFF' )
      oBrw:aCols[4]:bBmpData:={ || IIF( A->(DBSEEK(ganado->numero)), 1, 2 ) }

      DBGOTOP()
      oBrw:bKeyDown :={|nKey| Position(oConsulta, nKey, oBrw, archivos, cImagenes, cual, la_cia, @regresaNum) }
      oBrw:bLDblClick := {|| Browse_A(archivos, cImagenes, cual, la_cia, oBrw, @regresaNum) }  

      ACTIVATE DIALOG oConsulta CENTERED ON INIT (HB_SYMBOL_UNUSED(self),;
                      Browse_Bar(archivos,oConsulta,oBrw,@num,la_cia,cImagenes,oBtn,cual))
      oFuente:End()



Functions:
Position=just moves oBrw with methods UP(), DOWN() etc
Browse_Bar creates a bar on top of the browse to close the browse, or call the Position function to move oBrw registers
Browse_A show the register detail but DO NOT close any of the databases.

Besides this the new version creates an executable 30% bigger :?:

Any help would be appreciated.
ellano
 
Posts: 107
Joined: Tue Sep 15, 2009 7:52 am

Re: xBrowse error on version 18.05

Postby nageswaragunupudi » Thu Aug 23, 2018 3:07 pm

We can not compile and build your sample at our end to figure out where is the problem.
Can you please build a simpler sample using "states.dbf" and "customer.dbf" in \fwh\samples folder without using resources.
We will attend to the issue on top priority.

At the same time, let us assure you that we are not facing any issues with the applications built by us for our clients.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse error on version 18.05

Postby ellano » Fri Aug 24, 2018 7:47 am

Thanks

Maybe is the way I compile it using Borland 7.3. Correct me if I am wrong:
Since the resources come out in a weird way (check boxes and radio buttons specifically), I decide to continue compiling the resources using Borland 5.82 while the program is compiled using Embarcadero 7.30:

.PRG.OBJ:
$(HBDIR)\bin\harbour $< /L /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include
$(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -I$(BCDIR)\include\windows\sdk -I$(BCDIR)\include\windows\crtl -oobj\$& obj\$&.c

.C.OBJ:
echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
$(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
del tmp

while resources are previously compiled like this (using Borland 5.82):
Pedigree.res : Pedigree.rc
$(BCDIR)\bin\brc32.exe -r Pedigree.rc

Xbrowse are defined on the RC file as:
CONTROL "", 101, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER | WS_VSCROLL | WS_HSCROLL, 10, 20, 392, 252

All those pieces of code related to xBrowse are having the same issue: they unexpectedly and abruptly close the database they are working with (same code compiled with FiveWin 14.04+Borland 7.20 (main program) +Borland 5.82 (resources) work correctly)

On Embarcadero 7.20 I could at least use:
MyResourceFile.res : MyResourceFile.rc
echo -I$(BCDIR)\include\windows\sdk;$(BCDIR)\include\windows\crtl;$(HBDIR)\include;$(FWDIR)\include;$(PGDIR)\include > tmp
$(BCDIR)\bin\cgrc.exe -r @tmp MyResourceFile.rc
del tmp

To compile resources but there is not such command on (or I do not have it) Embarcadero 7.30

As a last test I tried to compile using FiveWin 18.05 + Embarcadero 7.20 (resources using Borland 5.82) and I get the following error:
Error: Unresolved external '__InitExceptBlockLDTC' referenced from D:\FWH1805\LIB\FIVEHC.LIB|GDIPFWH
Error: Unresolved external '_vector_new_ldtc_(void *, unsigned int, unsigned int, unsigned int, void *, unsigned int, void *)' referenced from D:\FWH1805\LIB\FIVEHC.LIB|GDIPLUS
Error: Unable to perform link

How do I include gdipfwh.cpp and gdiplus.cpp on the rmk file to avoid this mistake?

Emiliano Llano Díaz
ellano
 
Posts: 107
Joined: Tue Sep 15, 2009 7:52 am

Re: xBrowse error on version 18.05

Postby ellano » Fri Aug 24, 2018 10:00 am

Well, what about your own example :(

Image
ellano
 
Posts: 107
Joined: Tue Sep 15, 2009 7:52 am

Re: xBrowse error on version 18.05

Postby nageswaragunupudi » Sat Aug 25, 2018 4:58 pm

For me tutor07.prg is working without any errors.

Note: The situation displayed in the above screen-shot can happen when either (1) clientes.dbf is not found or (2) clientes.dbf is already in use by another program.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse error on version 18.05

Postby cnavarro » Sun Aug 26, 2018 7:55 am

ellano wrote:Well, what about your own example :(



I tested sample tutor07.prg with VS2017 and Borland 7.0/7.2 and run OK, not problem
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: xBrowse error on version 18.05

Postby ellano » Mon Aug 27, 2018 1:13 pm

Sorry, wrong image, should be this one:

Image


which goes with this code (taken and modified from your Samples XBGETBAR.PRG) :

Code: Select all  Expand view
#include "fivewin.ch"
REQUEST DBFCDX
//----------------------------------------------------------------------------//

function Main()
   SET DATE ITALIAN
   SET CENTURY ON
   SET DELETED ON
   RDDSETDEFAULT( "DBFCDX" )
   SetGetColorFocus()
   Sample1()
return nil

//----------------------------------------------------------------------------//

static function Sample1()
   local oDlg, oBrw, oFont, oBold
   local n

   USE CLIENTS NEW SHARED
   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-12
   DEFINE FONT oBold NAME "TAHOMA" SIZE 0,-12 BOLD
   DEFINE DIALOG oDlg SIZE 800,500 PIXEL TRUEPIXEL ;
      FONT oFont TITLE FWVERSION + " : Bar Get"
   @ 110,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE "CLIENTS" AUTOCOLS CELL LINES NOBORDER
   for n := 1 to Len( oBrw:aCols )
      WITH OBJECT oBrw:aCols[ n ]
         if FieldType( n ) != 'L'
            :uBarGetVal    := uValBlank( fieldGet( n ) )
            if FieldType( n ) == 'N'
               :cBarGetPic := NumPict( FieldLen( n ), FieldDec( n ) )
            endif
         endif
      END
   next
   oBrw:lGetBar   := .t.
   WITH OBJECT oBrw
      :nHeaderHeight    := 40 // optional
      :oHeaderFonts     := oBold
      :bClrEdits        := { || { CLR_BLACK, CLR_YELLOW } }
      :AutoFit()
      :CreateFromCode()
      :bLDblClick := {|| See_Clients(@oBrw) }
   END
   @ 10,20 SAY "Gets under Headers. Entered values can be used" + ;
      "for filtering or any othe purpose" + CRLF + ;
      "Usage: oCol:uBarGetVal := Space( 10 ); oBrw:lGetBar := .t." ;
      SIZE oDlg:nWidth - 40,40 PIXEL OF oDlg CENTER
   @ 60, 20 BTNBMP PROMPT { || If( oBrw:lGetBar, "Hide GetBar", "ShowGetBar" ) } ;
      SIZE 100,40 PIXEL OF oDlg FLAT ;
      ACTION ( oBrw:lGetBar := ! oBrw:lGetBar, oBrw:Refresh() )
   @ 60,140 BTNBMP PROMPT "Set Filter" ;
      SIZE 100,40 PIXEL OF oDlg FLAT ;
      ACTION ( oBrw:cAlias )->( SetFilter( oBrw ) )
   @ 60,250 BTNBMP PROMPT "Clear Filter" ;
      SIZE 100,40 PIXEL OF oDlg FLAT ;
      ACTION ( oBrw:cAlias )->( DBCLEARFILTER(), oBrw:Refresh(), oBrw:SetFocus() )
   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont, oBold
return nil

//----------------------------------------------------------------------------//
static function SetFilter( oBrw )
   local cFilter := ""
   local n, oCol, uVal, cType

   for n := 1 to Len( oBrw:aCols )
      oCol  := oBrw:aCols[ n ]
      if ! Empty( uVal := oCol:uBarGetVal )
         if !Empty( cFilter )
            cFilter  += " .AND. "
         endif
         cType    := ValType( uVal )
         do case
         case cType == 'C'
            uVal     := Upper( AllTrim( uVal ) )
            cFilter += '"' + uVal + '" $ UPPER( ' + FieldName( n ) + " )"
         otherwise
            cFilter  += FieldName( n ) + " == " + cValToChar( uVal )
         endcase
      endif
   next

   if Empty( cFilter )
      if ! Empty( DBFILTER() )
         DBCLEARFILTER()
         oBrw:Refresh()
      endif
   else
      if !( DBFILTER() == cFilter )
         SET FILTER TO &cFilter
         GO TOP
         oBrw:Refresh()
      endif
   endif
   oBrw:SetFocus()
return nil
//----------------------------------------------------------------------------//

//-----------------------------------------------------------------/
// See a client in detail
STATIC PROCEDURE See_Clients(oBrw)
   LOCAL numReg:= CLIENTS->(RECNO())
      register_Client(2, numReg, @oBrw)
      oBrw:REFRESH()
  CLIENTS->(DBGOTO(numReg))   //requiered since I change location on register_Clients
                              // Why is Clients closed????
  oBrw:REFRESH()
RETURN

//-----------------------------------------------------------------/
// Register a client
STATIC PROCEDURE Register_Client(nWhich, numReg, oBrw)
  LOCAL oDlg, oGet[3], oDbfC, oDbfS
  LOCAL cName, cAdd, dDate
  DATABASE oDbfC
  oDbfC:LOAD()
  oDbfC:GOTO(numreg)  // test
 
  USE SALES NEW SHARED
  DATABASE oDbfS
  oDbfS:LOAD()
  oDbfS:GOTOP()  //just a test, we will not skip this one
  dDate:= oDbfS:Date
  SELECT Clients
 
  cName:=oDbfC:Name
  cAdd:=oDbfC:Adress
 
 DEFINE DIALOG oDlg FROM 6, 7 TO 21, 72 TITLE "Client Management"
   @ 1, 2 SAY "Name:" OF oDlg
   @ 1, 8 GET oGet[1] VAR cName OF oDlg READONLY
   @ 2, 2 SAY "Address:" OF oDlg
   @ 2, 8 GET oGet[2] VAR cAdd OF oDlg READONLY
   @ 3, 2 SAY "Date:" OF oDlg
   @ 3, 8 GET oGet[3] VAR dDate OF oDlg READONLY
   @ 4, 3 BUTTON "&Previous"  OF oDlg SIZE 50, 12 ;
      ACTION ( DbSkip( -1 ), oGet[1]:cText:=clients->Name, oGet[2]:cText:=clients->Adress )

   @ 4, 14 BUTTON "&Next" OF oDlg SIZE 50, 12;
       ACTION ( DbSkip( 1 ),;
                If( EoF(), MsgInfo( "End of file" ),),;
                If( EoF(), DbGoBottom(),), oGet[1]:cText:=clients->Name, oGet[2]:cText:=clients->Adress)

   @ 4, 26 BUTTON "&End"  OF oDlg SIZE 50, 12 ACTION ( Position(Numreg,@oBrw), oDlg:End())
 ACTIVATE DIALOG oDlg
  RELEASE ALL
  UNLOCK ALL
RETURN

//-----------------------------------------------------------------/
// End Client Register
STATIC PROCEDURE Position(Numreg, oBrw)
  SALES->(DBCLOSEAREA())
  oBrw:REFRESH()
  SELECT Clients
  CLIENTS->(DBGOTO(NumReg))   //requiered since I change location somewhere here
RETURN


If I modified the code a bit like this:

Code: Select all  Expand view
#include "fivewin.ch"

REQUEST DBFCDX

//----------------------------------------------------------------------------//

function Main()

   SET DATE ITALIAN
   SET CENTURY ON
   SET DELETED ON
   RDDSETDEFAULT( "DBFCDX" )
   SetGetColorFocus()

   Sample1()

return nil

//----------------------------------------------------------------------------//

static function Sample1()

   local oDlg, oBrw, oFont, oBold
   local n

   USE CLIENTS NEW SHARED

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-12
   DEFINE FONT oBold NAME "TAHOMA" SIZE 0,-12 BOLD

   DEFINE DIALOG oDlg SIZE 800,500 ;
      FONT oFont TITLE FWVERSION + " : Simple Test"

   @ 10,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
       FIELDS clients->name,clients->Adress,clients->Country,clients->active;
       HEADERS "Name","Add.","Ctry","Actv" ;
       SIZES    110,   170,    80,   40 ;
       LINES NOBORDER

   WITH OBJECT oBrw
      :nHeaderHeight    := 40 // optional
      :oHeaderFonts     := oBold
      :CreateFromCode()
      :bLDblClick := {|| See_Clients(@oBrw) }
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont, oBold

return nil

//----------------------------------------------------------------------------//

static function SetFilter( oBrw )

   local cFilter := ""
   local n, oCol, uVal, cType

   for n := 1 to Len( oBrw:aCols )
      oCol  := oBrw:aCols[ n ]
      if ! Empty( uVal := oCol:uBarGetVal )
         if !Empty( cFilter )
            cFilter  += " .AND. "
         endif
         cType    := ValType( uVal )

         do case
         case cType == 'C'
            uVal     := Upper( AllTrim( uVal ) )
            cFilter += '"' + uVal + '" $ UPPER( ' + FieldName( n ) + " )"
         otherwise
            cFilter  += FieldName( n ) + " == " + cValToChar( uVal )
         endcase
      endif

   next

   if Empty( cFilter )
      if ! Empty( DBFILTER() )
         DBCLEARFILTER()
         oBrw:Refresh()
      endif
   else
      if !( DBFILTER() == cFilter )
         SET FILTER TO &cFilter
         GO TOP
         oBrw:Refresh()
      endif
   endif

   oBrw:SetFocus()

return nil

//----------------------------------------------------------------------------//

//-----------------------------------------------------------------/
// See a client in detail
STATIC PROCEDURE See_Clients(oBrw)
   LOCAL numReg:= CLIENTS->(RECNO())
   
      register_Client(2, numReg, @oBrw)
      oBrw:REFRESH()

  CLIENTS->(DBGOTO(numReg))   //requiered since I change location on register_Client
  oBrw:REFRESH()

RETURN


//-----------------------------------------------------------------/
// Register a client
STATIC PROCEDURE Register_Client(nWhich, numReg, oBrw)
  LOCAL oDlg, oGet[3], oDbfC, oDbfS
  LOCAL cName, cAdd, dDate
  DATABASE oDbfC
  oDbfC:LOAD()
  oDbfC:GOTO(numreg)  // test
 
  USE SALES NEW SHARED
  DATABASE oDbfS
  oDbfS:LOAD()
  oDbfS:GOTOP()  //just a test, we will not skip this one
  dDate:= oDbfS:Date
  SELECT Clients
 
  cName:=oDbfC:Name
  cAdd:=oDbfC:Adress
 
 DEFINE DIALOG oDlg FROM 6, 7 TO 21, 72 TITLE "Client Management"
   @ 1, 2 SAY "Name:" OF oDlg
   @ 1, 8 GET oGet[1] VAR cName OF oDlg READONLY
   @ 2, 2 SAY "Address:" OF oDlg
   @ 2, 8 GET oGet[2] VAR cAdd OF oDlg READONLY
   @ 3, 2 SAY "Date:" OF oDlg
   @ 3, 8 GET oGet[3] VAR dDate OF oDlg READONLY
   @ 4, 3 BUTTON "&Previous"  OF oDlg SIZE 50, 12 ;
      ACTION ( DbSkip( -1 ), oGet[1]:cText:=clients->Name, oGet[2]:cText:=clients->Adress )

   @ 4, 14 BUTTON "&Next" OF oDlg SIZE 50, 12;
       ACTION ( DbSkip( 1 ),;
                If( EoF(), MsgInfo( "End of file" ),),;
                If( EoF(), DbGoBottom(),), oGet[1]:cText:=clients->Name, oGet[2]:cText:=clients->Adress)

   @ 4, 26 BUTTON "&End"  OF oDlg SIZE 50, 12 ACTION ( Position(Numreg,@oBrw), oDlg:End())

 ACTIVATE DIALOG oDlg

  RELEASE ALL
  UNLOCK ALL
 
RETURN

//-----------------------------------------------------------------/
// End Client Register
STATIC PROCEDURE Position(Numreg, oBrw)
  SALES->(DBCLOSEAREA())
  oBrw:REFRESH()

  SELECT Clients
  CLIENTS->(DBGOTO(NumReg))   //requiered since I change location somewhere here

RETURN


and compile with a previous version of FiveWin, I do not get any error and can click happily as long as I want on the xBrowse list.

Thanks for your time and effort
Emiliano Llano Díaz
ellano
 
Posts: 107
Joined: Tue Sep 15, 2009 7:52 am

Re: xBrowse error on version 18.05

Postby nageswaragunupudi » Mon Aug 27, 2018 1:30 pm

Do you mean to say that the original programs is working correctly but the program as modified by you is giving error?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse error on version 18.05

Postby ellano » Tue Aug 28, 2018 6:12 am

Inv1.prg (no modifications)

Image
ellano
 
Posts: 107
Joined: Tue Sep 15, 2009 7:52 am

Re: xBrowse error on version 18.05

Postby nageswaragunupudi » Tue Aug 28, 2018 12:08 pm

There is no problem with the original xbgetbar.prg.

But there is a problem with your modifications to the program.
This is your question.

CLIENTS->(DBGOTO(numReg)) //requiered since I change location on register_Clients
// Why is Clients closed????


Please make a little change in your modifications.
In the STATIC PROCEDURE Register_Client(nWhich, numReg, oBrw), please substitute these first few lines
Code: Select all  Expand view

  DATABASE oDbfC
  oDbfC:LOAD()
  oDbfC:GOTO(numreg)  // test

  USE SALES NEW SHARED
  DATABASE oDbfS
  oDbfS:LOAD()
  oDbfS:GOTOP()  //just a test, we will not skip this one
  dDate:= oDbfS:Date
  SELECT Clients

  cName:=oDbfC:Name
  cAdd:=oDbfC:Adress
 


with these lines

Code: Select all  Expand view

  CLIENTS->( DBGOTO(numreg) ) // test

  USE SALES NEW SHARED
  DATABASE oDbfS
  oDbfS:LOAD()
  oDbfS:GOTOP()  //just a test, we will not skip this one
  dDate:= oDbfS:Date
  SELECT Clients

  cName  := CLIENTS->Name
  cAdd   := CLIENTS->Adress
 


Now you see that the alias CLIENTS is not closed and you can continue with the work.
Please test and confirm.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse error on version 18.05

Postby ellano » Tue Aug 28, 2018 1:26 pm

Yes it is true. But I need to open a Database object since the purpose of the Register_Client procedure, although not shown, is precisely to: Register a Client!

When I do

Code: Select all  Expand view

  Select Clients
  DATABASE oDbfC

  CLIENTS->( DBGOTO(numreg) ) // test Which should be the same as oDbfC:GOTO(NumReg)

  USE SALES NEW SHARED
  DATABASE oDbfS
  oDbfS:LOAD()
  oDbfS:GOTOP()  //just a test, we will not skip this one
  dDate:= oDbfS:Date
  SELECT Clients

  cName  := CLIENTS->Name
  cAdd   := CLIENTS->Adress
 


The error comes back, whether on the version I am currently using it works as advertised and I have the advantage of simply using further down on my code:

Code: Select all  Expand view
 
   oDbf:BLANK()
// ask for name and other data
      oDbf:numero     :regNum
      oDbf:_           :="M"  //etc...
      IF general(oDbf)  //if not cancel then proceed
        oDbf:Append()
        oDbf:SAVE()
        oDbf:COMMIT()
     ELSE
        MsgStop("Cancel","Register")
        DBGOTO(RegNum)
        oDbf:Load()
     ENDIF

 


Stupid idea, but, did something spectacular changed on the class tDatabase that closes the related database as the function or procedure ends?
ellano
 
Posts: 107
Joined: Tue Sep 15, 2009 7:52 am

Re: xBrowse error on version 18.05

Postby nageswaragunupudi » Tue Aug 28, 2018 2:25 pm

Yes it is true. But I need to open a Database object since the purpose of the Register_Client procedure, although not shown, is precisely to: Register a Client!


It is ok. I understand the problem. The very purpose of asking your confirmation is to zero down upon the real cause.
I wanted your confirmation that it is working correctly without using database object.

So the issue is not with xbrowse, but with incompatible use of database object with the recent changes.

In my next posts I will explain the recent changes in TDatabase class, but for now, kindly make this small change:

Please modify the TDatabase class in \fwh\source\classes\database.prg like this.
Towards the end of the program, please locate:
Code: Select all  Expand view
PROCEDURE td_destroy() CLASS TDataBase

   if ::ClassName() == "TDATABASE"
      ::End()
   endif

RETURN
 

Comment out ::End() like this:
Code: Select all  Expand view
PROCEDURE td_destroy() CLASS TDataBase

   if ::ClassName() == "TDATABASE"
//      ::End()  // comment out this line
   endif

RETURN
 


With this modification, I expect you will not face with the unexpected closure of DBF files.
Please test and confirm.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse error on version 18.05

Postby ellano » Wed Aug 29, 2018 6:24 am

I did the changes you suggested, but unfortunately that did not help:

The program presents no errors when DATABASE is omitted, errors come back as soon as the DATABASE statement is included.

You are on the right track. Should be something on the TDatabase class (or related class) that closes the DB connection. :evil:
ellano
 
Posts: 107
Joined: Tue Sep 15, 2009 7:52 am

Re: xBrowse error on version 18.05

Postby nageswaragunupudi » Wed Aug 29, 2018 8:59 am

ellano wrote:I did the changes you suggested, but unfortunately that did not help:

The program presents no errors when DATABASE is omitted, errors come back as soon as the DATABASE statement is included.

You are on the right track. Should be something on the TDatabase class (or related class) that closes the DB connection. :evil:

Please check again.
I made the suggestion only after checking here. I am sure it should work.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse error on version 18.05

Postby ellano » Wed Aug 29, 2018 9:34 am

Unfortunately no:

Image


Do you want me to send u anything else? (map, log, tds, obj, ppo)
ellano
 
Posts: 107
Joined: Tue Sep 15, 2009 7:52 am

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 47 guests