Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : BROWZE.ZIP
Filename : BROWTEST.PRG

 
Output of file : BROWTEST.PRG contained in archive : BROWZE.ZIP
select a
use person index person
select b
use children index children
set relation to no into person
select person
clear
text






this is a demonstration of superbrowze selecting a record in an indexed
file. this file is indexed on no. when you are in the no field you can enter
a number to have it jump to that record immediately (even if there are
thousands of records) because it is indexed. you can also move the cursor
over to the next field and locate on a value in that field. however, since
the file is not indexed on this field, the search will be much slower on
a large file. the num field is used to illustrate that the locate works
on numeric fields as if they were character (searching from the leftmost
character). entering 1 will find 1,10-19, etc., the first record beginning
with 1. Once a locate has been done, the message "F5: Next: " and the
locate scope. You can press F5 to find the next record in the locate scope.
When the last record has been reached, or you press a key that changes or
cancels the locate scope, this message disappears and F5 no longer works.

endtext
wait window " press return to continue.."
clear
store "no" to fld1
do browze with "Select Member Family","no,name,num"
if lastkey()=27
wait window " cancelled - press return "
cancel
endif
wait window " selected: "+name+" press return "
clear
text





Now the browse will show records in a detail file which are indexed
by no+upper(name). the browse is limited only to records whose no
matches the no of the person you just selected. because of this
limitation, you can not move to the next field and locate on it.

endtext
wait window " press return to continue.."
clear
store no to keyfld
select children
store "name" to fld1
store .t. to indx,srchkey
do browze with "Select Member for Family "+person->name,"name,relation,birth"
if lastkey()=27
wait window " Cancelled - press return "
else
wait window " Selected: "+name+" press return "
endif
clear
text






Now a demonstration of multiple selects, where you can select
multiple records with one call to browze. Each return selects the
current record (or unselects it) and moves to the next one. Pressing
ESC cancels the browze, F2 ends the browze. here you can also do a
locate on the other fields, including the birth date field. You can't
locate on the street field because this belongs to the Person file
and the active database is the Children file. You can use a
combination of F5 and enter to mark all records for a locate scope.
Try entering F, pressing enter to mark it and then pressing F5 and
enter repeatedly. All records for which the name begins with F will
be marked.

endtext
wait window " press return to continue.."
clear
replace all selected with .f.
go top
store .f. to indx && file is not indexed on first field
do browze with "Select Member Records",;
"name,relation,birth,person->street :h='*Street'",.t.
if lastkey()=27
wait window " cancelled - press return "
else
clear
@ 1,20 say "these records were selected: "
list for selected
endif
close databases

  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : BROWZE.ZIP
Filename : BROWTEST.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/