Home > Archive > Programming with dBASE > April 2006 > 'set filter to', 'browse' work only in command window !









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author 'set filter to', 'browse' work only in command window !
leander

2006-04-01, 8:23 pm


in dbase vi, I use 'set filter to' to sort on a specific field, then
opend the table and find the matching records. however i`m trying to do
the same thing with dbase plus and after making the condition and
viewing, the all the table data come up. (only when using 'browse' from
command the matching records come up.)

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


thanks



--
leander
------------------------------------------------------------------------
Posted via http://www.webservertalk.com
------------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message1446215.html

Frank J. Polan

2006-04-01, 8:23 pm

Leander

After opening the table from the Navigator, select Table from the Menu
and use Filter by Form. Or for more choices use dQuery

Frank Polan


On Tue, 28 Mar 2006 11:29:46 -0600, leander
<leander.25lq7s@mail.webservertalk.com> wrote:

>
>
>in dbase vi, I use 'set filter to' to sort on a specific field, then
>opend the table and find the matching records. however i`m trying to do
>the same thing with dbase plus and after making the condition and
>viewing, the all the table data come up. (only when using 'browse' from
>command the matching records come up.)
>
>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
>
>
>thanks



Gerald Lightsey

2006-04-02, 3:23 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\sam
ples\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\sam
ples\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
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com