Dec 102017
Clipper BROWSE function that will allow you to easily browse dBase-type files interactively.
File BROWSE21.ZIP from The Programmer’s Corner in
Category Dbase Source Code
Clipper BROWSE function that will allow you to easily browse dBase-type files interactively.
File Name File Size Zip Size Zip Type
BROWSE.LIB 21504 8420 deflated
BROWSER.DOC 15097 4761 deflated
D_BROWSE.PRG 6061 2230 deflated
NEW.TXT 736 410 deflated
QBROWSE.DOC 832 436 deflated
QBROWSE.LIB 20480 8120 deflated

Download File BROWSE21.ZIP Here

Contents of the BROWSER.DOC file


GLI Information Systems
162 Lawrence Road
Salem, NH 03079










I. Features of BROWSER 2.1:

o Allows browsing of databases in an update or a NON update mode

o User specified browse window

o Display and Edit memo fields

o Pop up individual record view - similar to dBASE's edit

o Displays fields in any order

o Displays fields multiple times

o Removable Boarder/Header and Status line

o Browse a subset of the DBF, like a filter but MUCH quicker

o Supports databases to 8192 records (previously 4096)

Included with the BROWSER file is the source file D_BROWSE.
This procedure is a demo and a full featured database Browse
utility. It is well commented and should be consulted for
additional information and examples.


II. BROWSER Parameters


Returns: TRUE - successful browse operations
FALSE - error will be displayed before exiting


Name: top & bottom
Range:0 to 24
Comments:Absolute Top and Bottom edges of the Browse window

Name:left & right
Range:0 to 79
Comments:Absolute Left and Right edges of the Browse window
Note: The difference between these must be large enough

to accommodate the total widths of your selected
Browse fields.

Range:ARRAY[1..max num of fields you wish to Browse on]
Comments: Initialize this array with the names of the fields
to browse on.

field_list[1] = 'NAME'
field_list[2] = 'ADDRESS'
field_list[3] = 'PHONE'
etc ...

The max number of fields may be less then (if you're
not browsing all fields), or greater then (if you're
browsing a field more then once), the actual number
of fields in the database.

Range:.T. or .F.
Comments: Set TRUE; allows editing, deleting, appending, etc.
Set FALSE; allows display only.

Range:.T. or .F.
Comments:Set TRUE; puts headings and boarders in window

Range:.T. or .F.
Comments: Set TRUE; puts a status line on line 24
It includes:Record number, Deleted, and Ins key


III. Browser Operation

A. Window Size

The top, left, bottom, and right parameters are straight
forward. By adjusting them you can pop-up the browse window within
any area of the screen. This is helpful in allowing you to design
your own screens and then browse in a specified area of it.

The key to remember when defining the left and right
parameters is that they must be far enough apart to accommodate the
widths of all of the fields to be browsed plus a space between
them. If the difference between right and left is greater then the
space required, Browser does its best to format the extra spaces.
Some adjustment may be required for best results.

B. Field List

This array defines the fields that will be browsed in
Browser's window. Since Browser does not 'PAN' fields as dBASE does
- only the fields which are required, and will fit into the browse
window, should be included in this array. (To pop-up a full record
view, including all fields, use F9).

One of the advantages of this implementation over dBASE's is
that the user can change the order of the fields. This way, if a
browse is for a specific reason (ex. entering phone numbers), then
that field can be given precedence and displayed first. Another
advantage is the ability to display a field more then once. This
may seem trivial at first but it is useful for placing a reference
field both first and last on a browse line.

C. Update

This logical flag determines whether or not the database can
be edited while browsing. If set TRUE, all editing functions are
active (ie. Delete, Append, Delete, Memo Edit). If set FALSE, no
updates will be made.

D. Headings

This logical flag determines whether or not the field names
are listed at the top of the browse window and also if column
borders are displayed.

E. Status

This logical flag determines whether or not the status line
is displayed on line 24. If set TRUE, the record number, Deleted
status, and Ins key status will be displayed.


III. Browser Operation

F. Global Variable Declarations

The following variables must be declared in the TOP level of
your system:

REC[], lastrec, and needstore.

The c_ variables are the default color strings required by BROWSER.
These can be modified to suit your preferences.

REC[] is the array which stores the locations of all of the
elements to browse on. Declare this array PUBLIC and big enough
to hold all of the records in a database PLUS any records which
will be appended.

Lastrec should be declared as 0. The functions BROWSER or INITREC
will set it correctly.

Needstore tells BROWSER weather or not to initialize the REC[]
array. Declare it as .T. If INITREC is called and returns .T.,
Needstore will be set .F. This tells BROWSER that the REC[] array
is already set.

G. Special Keys

F1 - Help key - Pops up a screen similar to the box placed
at the top of dBASE's browse.

F9 - View - Pops up a window view of the current record.
Record ALL fields are displayed, not just the selected
browse fields. No editing is allowed.

CTRL - Go Top - Goes to the first record of the database.

CTRL - Go - Goes to the last record of the database.
END Bottom

CTRL - Memo - If the cursor is currently in a memo field,
PgDn Edit then a edit window is popped up.



A. Introduction

INITREC is a new function for version 2.0. This function is
designed to help you initialize the records that you would like to
browse. As an example, consider this:

I have a database called FILELST.DBF which contains a
directory of all of the files on a BBS. Some of the field
names are NAME, SIZE, DATE, and COMMENTS. Two different
scenarios are:

I. I want to browse all of the file names with a date
after a given date (New Uploads).

II. I want to browse all of the file names with the word
"CLIPPER" imbedded in the field COMMENTS.

Both of these scenarios describe instances where you want to
browse on a subset of the entire database. With DBEDIT and a filter
you could accomplish this, but have you ever tried it with a large
database? BOF & EOF flags provide VERY slow response. A DBF initial-
ized with INITREC provides instantanous response!

B. Initrec Parameters

Returns:TRUE - at least one record matching conditions found
FALSE - no records matching the conditions were found


Comments:a variable name containing the key of the search

Range:< > = <= >= $
Comments:Passed as a string (ie. "=")

Comments:where to perform search


IV. INITREC (cont)

C. Initrec Operation

Using the above scenarios you would invoke each case as

I. Some lead work would have prompted and stored the date
to browse after. We'll use mdate. Since we want all DATES
after mdate, the function call would be:

mdate = CTOD("05/12/89")
OK = INITREC(mdate,">","DATE")

Then if OK you would invoke set the global variable
NEEDSTORE = .F. and call Browser. If ! OK then no records
were found and there is no since calling Browser.

II. Some lead in work would have prompted and stored the
string to browse on. We'll use keyword. Since we want all
occurrences of keyword, the function call would be:

keyword = "Clipper"
OK = INITREC(keyword,"$","COMMENTS")

For our example, if OK then the word Clipper was found
somewhere in the field COMMENTS for at least one record.
Note that upper/lower case matters to INITREC.

NOTE: Because of the versatility with which you can tell
BROWSER how to initialize the REC[] array, once you
have initialized a database, you may not need to
initialize it again (saving a great deal of time on
larger databases). This would most likely be after
a database was opened as NON Update and no changes
could have been made. When a new browse is desired
on the same database, simply set Needstore = .F.
and don't call INITREC. The browse window will appear
immediately, even if 10,000 records are in the DBF!
This will work for an edited database too, but the
results are somewhat less reliable. Don't be afraid
to try it and test the results.


V. Revision History

Version Changes
------- ------------------------------------------------------

2.1 o Increased the allowable database size to 8196 recs

2.0 o Improved screen scrolling

o Improved Numeric and Date Field handling

o Full record view mode (F9) now handles
unlimited number of fields

o Ctrl-Home and Ctrl-End added to go quickly
to the top or bottom of the database

o D-Browse driver program improved

o Initialization function INITREC added

1.0 o Initial Shareware release


VI. Miscellaneous

There's no doubt. BROWSER 2.1 is a better product then the
original release! The numeric handling and limited field view,
to mention a few, were unacceptable. As promised, version 2.1
fixes these problems and adds some enhancements.

The only real problem I see with BROWSER 2.1 is that it is
still not intended for use on a PC\XT. A fast machine is necessary
to initialize the arrays in a reasonable amount of time. Also,
VERY LARGE databases may take some time to initialize even on the
fastest of machines.

As with BROWSER 1.0, I ask only that you pay for this product
if you use it for development and profit. Of course, any other
reasons are quite alright. Source code will be provided to
registered users.

Pirates beware. This version has a limited life and if you
include it in a clients application, it will eventually bomb.
New versions will be placed in the public domain periodically,
so most users need not worry.

Registration is still $ 29.95 and orders, comments, etc.
can be sent to me at:

GLI Information Systems
162 Lawrence Road
Salem, NH 03079

and also:

COMPUSERVE 73767,1473


 December 10, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>