TData with 10.3

TData with 10.3

Postby Otto » Thu Apr 08, 2010 6: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: Select all  Expand view
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
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6330
Joined: Fri Oct 07, 2005 7:07 pm

Re: TData with 10.3

Postby nageswaragunupudi » Thu Apr 08, 2010 7: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: Select all  Expand view
  METHOD FCount()            INLINE ( ::nArea )->( FCount() )

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

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

Re: TData with 10.3

Postby norberto » Thu Apr 08, 2010 7:26 pm

i have the same problem... can someone contact james bott to try any solution? thanks
norberto
 
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: TData with 10.3

Postby nageswaragunupudi » Fri Apr 09, 2010 12:09 am

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

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

Re: TData with 10.3

Postby TimStone » Fri Apr 09, 2010 4: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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: TData with 10.3

Postby James Bott » Fri Apr 09, 2010 5:05 pm

Otto and Norberto,

See your private email for an updated copy of TData.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: TData with 10.3

Postby norberto » Fri Apr 09, 2010 6:10 pm

hi james, very thanks... my email is norberto@windowslive.com
norberto
 
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Re: TData with 10.3

Postby mmercado » Fri Apr 09, 2010 6: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 :D

Best regards.
manuelmercado at prodigy dot net dot mx
User avatar
mmercado
 
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], jmartial, Marc Venken and 113 guests