04-03-06 12:18 AM
On Tue, 28 Mar 2006 11:29:46 -0600, in the dbase.programming group,
leander said...
> How can I cause the " Set filter to" to causes the database to appear
> that it contains only records meeting the condition as I use to do in
> version 4
Here is an example you can use at the command line.
close tables
use "c:\program files\dbase\plus\samples\fish.dbf"
browse
set filter to "blue" $ lower(name)
go top
Only the two records with
"Blue Angelfish"
and
"Bluehead Wrasse"
in the name field should be displayed
As has always been true it is necessary to move the record pointer in a
workarea for a filter to take effect. This is what the go top command
accomplishes. Also the $ ( contained in ) operator works just the same
as it did for years in DOS versions of dBASE. Also note that the path
to the file needed to be inside quotes because it included a folder,
(i.e. program files), that contains a space in its name.
A more traditional set-up of a filter might be to use a table containing
names such as...
use "c:\program files\dbase\plus\samples\contax\data\con
tacts.dbf" in
select()
select contacts
set filter to firstname = "Jay"
go top
browse
Note that the browse command can be called before or after the filter is
set.
What I am telling you here is the way you USE a table in a workarea just
as you did for years in dBASE DOS versions. The 32 bit Windows versions
of dBASE of which PLUS is the latest sub-version ALSO can open a query
of a table in memory. That is what happens in plus if you simply double
click on the table name in the Navigator. When a query is opened in
memory rather than having a cursor opened to a disk file in a work area
you have to use different OODML (Object Oriented Data Manipulation)
tools and syntax to address the table as has already been explained to
you briefly by someone else.
Gerald
[ Post a follow-up to this message ]
|