Database - 17.07 - Problems

Diego Decandia
Posts: 39
Joined: Fri Aug 22, 2014 6:21 am

Re: Database - 17.07 - Problems

Post by Diego Decandia »

Yes, i'm using fwh 17.07
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Database - 17.07 - Problems

Post by TimStone »

Again, the process of elimination:

Harbour = Same Version
xHarbour = Same Version
FWH 17.07 installed
All external libraries remain the same
Source code remains the same

Substitute datamanager.prg from 17.06 and the problem is fixed. Take it away, allowing datamanager from 17.07, and problem returns.
I'm not seeing how that can be something else ... but then it is Friday afternoon after too much time looking at a computer.
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
Diego Decandia
Posts: 39
Joined: Fri Aug 22, 2014 6:21 am

Re: Database - 17.07 - Problems

Post by Diego Decandia »

Yes, even for me, using Tdatabase from 17.04, all seems ok and < Close clients > always works.
Diego Decandia
Posts: 39
Joined: Fri Aug 22, 2014 6:21 am

Re: Database - 17.07 - Problems

Post by Diego Decandia »

I tried to edit TDatabase version 17.07 in this way

Code: Select all

PROCEDURE td_destroy() CLASS TDataBase

//   ::End()

RETURN
 
and my problem does not occur. Does it also apply to other problems?
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Database - 17.07 - Problems

Post by Antonio Linares »

This method was recently added to Clase TDataBase:

METHOD End() INLINE ::Close()

Tim, Please remove it and try your app again, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
Diego Decandia
Posts: 39
Joined: Fri Aug 22, 2014 6:21 am

Re: Database - 17.07 - Problems

Post by Diego Decandia »

Removing Method End, I get

Code: Select all

>>>Error BASE/1004  Message not found: TDATABASE:END
   Errore avvenuto il 01/09/17, alle 13:19:15
 
   Chiamato da: .\source\function\HARBOUR.PRG => _CLSSETERROR( 247 )
   Chiamato da: C:\fwh\source\classes\database.prg => TDATABASE:END( 913 )
   Chiamato da: C:\fwh\source\classes\database.prg => TDATABASE:__DESTRUCTOR( 1360 )
   Chiamato da:  => TDATABASE:CLASSH( 0 )
 
Diego Decandia
Posts: 39
Joined: Fri Aug 22, 2014 6:21 am

Re: Database - 17.07 - Problems

Post by Diego Decandia »

Ok, removing method End and the call to ::End in td_destroy(), is ok.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Database - 17.07 - Problems

Post by Antonio Linares »

Or modify it this way:

METHOD End() VIRTUAL
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Database - 17.07 - Problems

Post by James Bott »

Antonio,

It was me that requested the End() method. The reason was to conform to polymorphism with this class. Every other class has an End() method but TDatabase only had a Close() method.

There is a new Procedure called TD_Destroy() that was also added in ver 17.07. I don't understand the reason for it. It's only purpose is to end the object and it seems to be doing this at the wrong point. I think we should review why this procedure was added.

PROCEDURE td_destroy() CLASS TDataBase

::End()

RETURN

So, if we just make the End() method virtual, it doesn't end the object and TD_Destroy does nothing. TD_Destroy is NOT being called in the object. The definition in the Class definition is:

DESTRUCTOR td_destroy()

So apparently it is being called outside the class somewhere.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Database - 17.07 - Problems

Post by TimStone »

I just did a complete FWH\Source file search, and the only place td_destroy( ) is found is in tDatabase.prg
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Database - 17.07 - Problems

Post by James Bott »

Tim,

Try putting a msgInfo() inside the TD_Destroy procedure (before the ::end() ) and link the revised class into your code. Then recreate the error and see if the message pops up.

I would do it myself, but I have still been unable to recreate the error.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Database - 17.07 - Problems

Post by TimStone »

James Bott wrote:Tim,

Try putting a msgInfo() inside the TD_Destroy procedure (before the ::end() ) and link the revised class into your code. Then recreate the error and see if the message pops up.

I would do it myself, but I have still been unable to recreate the error.

James
unfortunately Im heading out for a few days


Sent from my iPhone using Tapatalk
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Database - 17.07 - Problems

Post by James Bott »

Tim,

The thought just occurred to me that it is possible that Windows is calling the destroy procedure. That could explain not finding a call anywhere in the FWH code, but it still getting called.

Have a great trip!

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Database - 17.07 - Problems

Post by TimStone »

Actually heading your way ... to Carlsbad ...
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
Diego Decandia
Posts: 39
Joined: Fri Aug 22, 2014 6:21 am

Re: Database - 17.07 - Problems

Post by Diego Decandia »

James,

In my test, opening first DLG1 that uses TDatabase, the MsgInfo appears twice before showing dialog and Xbrowse.

If I then open Dlg2 (which uses a dbf), I see the message closing.

If I first open the DLG2, no message is shown.

A bit complex...
Post Reply