FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TData with 10.3
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
TData with 10.3
Posted: Thu Apr 08, 2010 06:17 PM
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 (fw): Select all Collapse
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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TData with 10.3
Posted: Thu Apr 08, 2010 07:06 PM
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 (fw): Select all Collapse
   METHOD FCount()            INLINE ( ::nArea )->( FCount() )

From version 10.2
Code (fw): Select all Collapse
   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 (fw): Select all Collapse
   METHOD FCount()            INLINE ( ::nArea )->( FCount() )
Regards



G. N. Rao.

Hyderabad, India
Posts: 566
Joined: Thu Aug 30, 2007 03:40 PM
Re: TData with 10.3
Posted: Thu Apr 08, 2010 07:26 PM

i have the same problem... can someone contact james bott to try any solution? thanks

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: TData with 10.3
Posted: Fri Apr 09, 2010 12:09 AM

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

Regards



G. N. Rao.

Hyderabad, India
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: TData with 10.3
Posted: Fri Apr 09, 2010 04:30 PM

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
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: TData with 10.3
Posted: Fri Apr 09, 2010 05:05 PM

Otto and Norberto,

See your private email for an updated copy of TData.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 566
Joined: Thu Aug 30, 2007 03:40 PM
Re: TData with 10.3
Posted: Fri Apr 09, 2010 06:10 PM

hi james, very thanks... my email is norberto@windowslive.com

Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Re: TData with 10.3
Posted: Fri Apr 09, 2010 06:43 PM
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 :-)

Best regards.
manuelmercado at prodigy dot net dot mx

Continue the discussion