A toolbox of netfunctions and tDatabase-tests

Re: A toolbox of netfunctions and tDatabase-tests

Postby ukoenig » Sat Jan 26, 2019 8:59 pm

James,

here is the new downloadlink
PACK and ZAP is working now :roll:
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 )

Image

regards
Uwe :D
Last edited by ukoenig on Wed Feb 13, 2019 9:23 pm, edited 4 times in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: A toolbox of netfunctions and tDatabase-tests

Postby Silvio.Falconi » Mon Jan 28, 2019 8:20 am

ukoenig wrote:Silvio,

function Browse() is not compatible with tDatabase.

tested from inside the tool

Image

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

Image

regards
Uwe :D


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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: A toolbox of netfunctions and tDatabase-tests

Postby Silvio.Falconi » Mon Jan 28, 2019 8: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: Select all  Expand view

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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: A toolbox of netfunctions and tDatabase-tests

Postby ukoenig » Wed Jan 30, 2019 3: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. :D
( 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 )

Image

regards
Uwe :D
Last edited by ukoenig on Wed Feb 06, 2019 1:20 pm, edited 1 time in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: A toolbox of netfunctions and tDatabase-tests

Postby ukoenig » Wed Feb 06, 2019 1: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 )

Image

regards
Uwe :D
Last edited by ukoenig on Thu Feb 07, 2019 2:31 pm, edited 1 time in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: A toolbox of netfunctions and tDatabase-tests

Postby Silvio.Falconi » Thu Feb 07, 2019 8: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: A toolbox of netfunctions and tDatabase-tests

Postby Otto » Thu Feb 07, 2019 10:25 am

Why do you need the ID?
Try with a global unique identifier.
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: A toolbox of netfunctions and tDatabase-tests

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: A toolbox of netfunctions and tDatabase-tests

Postby Otto » 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.
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: A toolbox of netfunctions and tDatabase-tests

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: A toolbox of netfunctions and tDatabase-tests

Postby karinha » 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
User avatar
karinha
 
Posts: 7824
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: A toolbox of netfunctions and tDatabase-tests

Postby ukoenig » 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

Image

testing ORDSCOPE

Image

regards
Uwe :D
Last edited by ukoenig on Thu Feb 07, 2019 2:29 pm, edited 1 time in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: A toolbox of netfunctions and tDatabase-tests

Postby karinha » Thu Feb 07, 2019 1: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

Image

testing ORDSCOPE

Image

regards
Uwe :D


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
User avatar
karinha
 
Posts: 7824
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: A toolbox of netfunctions and tDatabase-tests

Postby ukoenig » Thu Feb 07, 2019 2: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

Image

regards
Uwe :D
Last edited by ukoenig on Tue Feb 12, 2019 10:04 am, edited 1 time in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: A toolbox of netfunctions and tDatabase-tests

Postby ukoenig » Fri Feb 08, 2019 9: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: Select all  Expand view

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 :D

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

Image

regards
Uwe :D
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 80 guests