FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour A toolbox of netfunctions and tDatabase-tests
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: A toolbox of netfunctions and tDatabase-tests
Posted: Sat Jan 26, 2019 08:59 PM
James,

here is the new downloadlink
PACK and ZAP is working now :-)
some more improvements are done :
closing the program, the number of the last selected sample is saved to a INI-file
and will be opened at the next start.
Using different colours on each of the 3 samples
A new empty dialog is added to include more tests.

I couldn't find a replacement of
h := FW_RecToHash() :-) replacement -> h := ReadToHash() :-)
FW_HashToRec( h ) :-)

DOWNLOAD

http://www.pflegeplus.com/DOWNLOADS/Network.zop
( rename zop to zip )



regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: A toolbox of netfunctions and tDatabase-tests
Posted: Mon Jan 28, 2019 08:20 AM
ukoenig wrote:Silvio,

function Browse() is not compatible with tDatabase.

tested from inside the tool



also You can use from folder < samples > xbradded.prg
next select tDatabase and You can browse the file customer.



regards
Uwe :-)


Uwe,

I not write Browse() but xbrowser oCustomers

James wrote Browse()
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: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: A toolbox of netfunctions and tDatabase-tests
Posted: Mon Jan 28, 2019 08:30 AM
Uwe,
do you try it on Lan Network xbradded.prg ?

When I edit a customer I open Custedit() ok ?

and Insert new customer Number 501

But I not save it because I'm distracted or I have to go to the bathroom or I'm having coffee...

and I leave the window open
Code (fw): Select all Collapse
static function CustEditDlg( oRec )

   local oDlg, oFont, oGrp

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 618,382 PIXEL FONT oFont TITLE "CUSTOMER"



You are on another terminal and Open the same function Custedit() and Insert new customer Number 501
and save it

when I return back also I save the customer and we have a surprice...

two records with the same number 501
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: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: A toolbox of netfunctions and tDatabase-tests
Posted: Wed Jan 30, 2019 03:42 PM
I finished the tests with many improvements.
Field copy and field replacements.
Once the original DBF is destrroyed from testing, You can restore it from CUST_ORG.dbf

No problems found. :-)
( Just let me know if there is still something wrong )

The new third dialog can be used for Your own tests and works from code.

DOWNLOAD

http://www.pflegeplus.com/DOWNLOADS/Network.zop
( rename zop to zip )



regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: A toolbox of netfunctions and tDatabase-tests
Posted: Wed Feb 06, 2019 01:11 PM
After many tests and changes
( 3 empty dialogs are added for more tests )

included

tests of : new, delete, undelete, pack, zap,
save from gets, array-copy, backup restore
and much more

DOWNLOAD

http://www.pflegeplus.com/DOWNLOADS/Network.zop
( rename zop to zip )



regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: A toolbox of netfunctions and tDatabase-tests
Posted: Thu Feb 07, 2019 08:41 AM

Uwe,
try to make a source dialog edit and add new Id ( incremental field Cr as "0001"-> strzero(recno+1,4))
1. open the test dialog on two different pc ( A,B)
2. Insert a new record on Pc A but not save
3. Insert a new record on Pc B but not save
4. save Pc A
5. save Pc B
and see if you have two record with the same id

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: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: A toolbox of netfunctions and tDatabase-tests
Posted: Thu Feb 07, 2019 10:25 AM

Why do you need the ID?
Try with a global unique identifier.
Otto

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: A toolbox of netfunctions and tDatabase-tests
Posted: Thu Feb 07, 2019 10:31 AM

I need
a field character of 4 called ID sample "0001"
I'm asking the moon ?

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: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: A toolbox of netfunctions and tDatabase-tests
Posted: Thu Feb 07, 2019 11:16 AM

A consecutive number and chronological order when entering is only possible if you accept that you also have records with a serial number that are empty.
If you pull the number at the beginning of the input and then the user aborts the input, then the number is used and the data record is empty.
Otherwise you have to drag the number when saving.

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: A toolbox of netfunctions and tDatabase-tests
Posted: Thu Feb 07, 2019 11:29 AM

it's all right what you say, I prefer to have a compatibility with the old procedure done in single user (exclusive way).

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: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: A toolbox of netfunctions and tDatabase-tests
Posted: Thu Feb 07, 2019 12:00 PM

Master Uwe, sorry for my stupidity, could you explain the purpose of this program, please?

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: A toolbox of netfunctions and tDatabase-tests
Posted: Thu Feb 07, 2019 12:18 PM
karinha,

the purpose :

1. examples of the syntax to use the different methods of tDatabase
2. easy adding of Your own tests without starting from the beginning to define dialogs, browser ....
It works like a box to include different tests.
everything is included in just one program

I just added to a empty dialog Silvios ID-number test
next I'm working on a test of using ORDSCOPE using tDatabase instead of a filter

Silvios ID-number-test
I added the needed ID-number to Customer.dbf



testing ORDSCOPE



regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: A toolbox of netfunctions and tDatabase-tests
Posted: Thu Feb 07, 2019 01:07 PM
ukoenig wrote:karinha,

the purpose :

1. examples of the syntax to use the different methods of tDatabase
2. easy adding of Your own tests without starting from the beginning to define dialogs, browser ....
It works like a box to include different tests.
everything is included in just one program

I just added to a empty dialog Silvios ID-number test
next I'm working on a test of using ORDSCOPE using tDatabase instead of a filter

Silvios ID-number-test
I added the needed ID-number to Customer.dbf



testing ORDSCOPE



regards
Uwe :-)


oK. Many thanks master Uwe.

Translate for portuguese:

o objetivo :

1. exemplos da sintaxe para usar os diferentes métodos de tDatabase

2. fácil adição de seus próprios testes sem começar desde o início para definir diálogos, navegador ....
Funciona como uma caixa para incluir testes diferentes.
tudo está incluído em apenas um programa

Acabei de adicionar a uma caixa de diálogo vazia Silvios ID-number test
Em seguida, estou trabalhando em um teste de uso de ORDSCOPE usando tDatabase em vez de um filtro

Teste de número de ID da Silvios
Eu adicionei o número de identificação necessário ao Customer.dbf


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: A toolbox of netfunctions and tDatabase-tests
Posted: Thu Feb 07, 2019 02:31 PM
A typical usage

I finished Silvios test with ID - numbers
There is NO problem with the Id's NO double numbers


try to make a source dialog edit and add new Id ( incremental field Cr as "0001"-> strzero(recno+1,4))
1. open the test dialog on two different pc ( A,B)
2. Insert a new record on Pc A but not save
3. Insert a new record on Pc B but not save
4. save Pc A
5. save Pc B
and see if you have two record with the same id
I need
a field character of 4 called ID sample "0001"


DOWNLOAD

http://www.pflegeplus.com/DOWNLOADS/Network.zop
( rename zop to zip )

You can open the program twice, that will have the same effect like a workstation.

there are 2 different solutions :
1. a new record added with the new Id
2. a new record added WITHOUT Id. The < Id > is added together with the other fields using the < Save button >

Buttons ;

New 1 = new with ID
New 2 = new with NO ID
Zap = Zap file
Restore original = replaces DBF with backup
Renumber = write all ID's new
Save = save vars to DBF with a defined ID from record-number



regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: A toolbox of netfunctions and tDatabase-tests
Posted: Fri Feb 08, 2019 09:02 PM
Hello,

I need some help for the new FILTER-section to complete it.
It belongs to the first 3 positions using < Setfilter >

1. oCust:SetFilter(" Last :-)
3. oCust:SetFilter( " Hiredate :-)


2. oCust:SetFilter( " Age works :-)

Code (fw): Select all Collapse
IF nAge2 = 0 // only nAge1
   oCust:SetFilter( " Age == " + STR(nAge1) )  // from GET - field
ELSE
   oCust:SetFilter( " Age >= " + STR(nAge1) + " .and. Age <= " + STR(nAge2) )  
ENDIF


The problem seems to be the defined vars of 1 and 3
tests 2, 4 and 5 and 6 are working :

oCust:SetFilter( " Married = .T. " )
oCust:SetFilter( " Married = .F. " )
oCust:ClearFilter()


As well all ORDSCOPE-tests are working fine :-)

The test is included in < TDATAB3.prg >
Thw index is defined in < NETWORK.prg >

DOWNLOAD

http://www.pflegeplus.com/DOWNLOADS/Network.zop
( rename zop to zip )

1. Select a filter from the radio
2. define filter vars ( filter 1, 2 or 3 ) if needed
3. select button < Ordscope > or < Setfilter >

Test : showing all customers with age 60 using ORDSCOPE



regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.