FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour to simplify the Tdatabase call
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
to simplify the Tdatabase call
Posted: Mon May 17, 2021 08:18 AM
I wanted to know if in Tdatabase I can do this

sample

CLASS TUtenti from TDataBase
METHOD New()
METHOD ToArray()
ENDCLASS

METHOD New( lShared ) CLASS TUtenti
Default lShared := .t.
::New(,oApp():cExePath + "Utenti" ,, lShared)
if ::use()
::setOrder(1)
::gotop()
endif
RETURN Self

METHOD ToArray(aTmp) CLASS TUtenti
if ::use()
aTmp:=ARRAYTODBF()
endif
RETURN aTmp


because I have some function I use often on all procedures and I ask I can insert on each class ,
but for a sample I not Know How save the field to array with arraytodbf until nos I used fw_arratodbf ( exclusive)

ANY SOLUTION ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: to simplify the Tdatabase call
Posted: Thu May 20, 2021 11:33 PM

Silvio,

I thought you already had this working? And the way you show it you care creating and array with every field, and I thought you only needed 3 fields?

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: to simplify the Tdatabase call
Posted: Fri May 21, 2021 05:20 AM

James,
I resolved but I not use arraytodbf but to hand

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: to simplify the Tdatabase call
Posted: Fri Jun 04, 2021 10:51 PM
Silvio,

I resolved but I not use arraytodbf

Hmm, doesn't arraytodbf() take an array and put it into a DBF? I think you want DBFtoArry() if there is such a method.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion