TData with 10.3

Post Reply
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

TData with 10.3

Post by Otto »

Hello James,
would you be so kind to help me.
I updated to version 10.3. Now if I try to open a certain dbf-file I get following error:

Code: Select all

Application
===========
   Path and name: C:\xwinhotel\xwinhotel.EXE (32 bits)
   Size: 3,633,152 bytes
   Time from start: 0 hours 0 mins 4 secs 
   Error occurred at: 08.04.2010, 20:08:03
   Error description: Error BASE/1111  Argument error: LEN
   Args:
     [   1] = U   

Stack Calls
===========
   Called from:  => LEN(0)
   Called from: .\source\classes\DATABASE.PRG => (b)TDATABASE:TDATABASE(99)
   Called from:  => TDATA:FCOUNT(0)
   Called from: .\source\classes\DATABASE.PRG => TDATA:LOAD(657)
   Called from: ..\SOURCE\TDATA.PRG => TDATA:USE(555)
   Called from: C:\develop8\WH_Fwh\XWINHO~1\WINHOTEL.PRG => MAIN(0)

System
======
 

If I link in FIVEWIN database.prg from a previous version all is working.
Thanks in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: TData with 10.3

Post by nageswaragunupudi »

If you use TDatabase class as in FWH database.prg there should be no problem. Version 10.3 TDatabase class works well. You may check browing of database object in the sample testxbr3.prg.

I understand, TData class is derived from TDatabase class of FWH. TDatabase class has a DATA aStruct. From version 10.2 onwards this is the change in the method FCount() in tdatabase class of FWH

Upto version 10.1

Code: Select all

   METHOD FCount()            INLINE ( ::nArea )->( FCount() )
From version 10.2

Code: Select all

   METHOD FCount()            INLINE Len( ::aStruct )
 
This change was necessary due to several other improvements in tdatabase.prg. From the above error, I understand that the TData class is not maintaining the DATA aStruct and therefore Len(::aStruct) fails.

One solution is to override method FCount() in the derived class in your application ( or Tdata class ).

In your derived class:

Code: Select all

   METHOD FCount()            INLINE ( ::nArea )->( FCount() )
Regards

G. N. Rao.
Hyderabad, India
norberto
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: TData with 10.3

Post by norberto »

i have the same problem... can someone contact james bott to try any solution? thanks
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: TData with 10.3

Post by nageswaragunupudi »

Similar to FCount(), FieldPos() also is changed.
Regards

G. N. Rao.
Hyderabad, India
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: TData with 10.3

Post by TimStone »

I discussed this with James last month. Here is the solution:

Remove the line and add the line shown below in the Use() method of TData. Just put the new line right were the old line was.

//::load() // Remove this line
::setArea( ::nArea ) // New for TDatabase 10.02
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: TData with 10.3

Post by James Bott »

Otto and Norberto,

See your private email for an updated copy of TData.

Regards,
James
norberto
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: TData with 10.3

Post by norberto »

hi james, very thanks... my email is norberto@windowslive.com
User avatar
mmercado
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Re: TData with 10.3

Post by mmercado »

Dear James:
James Bott wrote:See your private email for an updated copy of TData.
I'll be checking my email every minute from now :D

Best regards.
manuelmercado at prodigy dot net dot mx
Post Reply