FoxPro : LIST and DISPLAY

1 comment
For show what is stored in database file there are two commands used in FoxPro- 
1. LIST   2. DISPLAY

LIST:  LIST provides facility to show all the records available in database file continuously. We also use LIST command to show the specific record only according to given condition and with specified field only
        Syntax:         LIST  [field1,field2…fieldn] FOR (expressions)
Ex:
                LIST                                                        (Show all the records continuously)
                LIST  FOR  NAME=”Tony”                   (Show only record related to name Toney)
                LIST  FOR ROLL>80                           (Show records which ROLL is greater than 80)
                LIST  FIELDS NAME, ROLL FOR PIN=803213            
(show record with field NAME and ROLL          
which PIN =803213)
Note:     1. expression may be mathematical and logical
                2. In expression character data is enclosed inside (“  “or ‘ ‘ or [ ])


DISPLAY: DISPLAY command is other variant of LIST command that is worked something same as LIST command. Simple DISPLAY command show the current record only where pointer is pointed. Pointer is controlled with GOTO command.
Actually DISPLAY ALL is equal to LIST but major difference between LIST and DISPLAY ALL is LIST show all record continuously where DISPLAY Pause when screen is fill with record and prompt and ask “press any key to continue..”

        Syntax:           DISPLAY  [field1,field2…fieldn] FOR (expressions)
EX:         
                USE  ADDRESS                                                   (Before using DISPLAY command it is necessary)
                DISPLAY ALL                                                       (Display all record and prompt for “press any  key  to continue”)
                DISPLAY  FOR name=”Tony”                        (Display all record that have name Tony)
                DISPLAY  ALL  FIELDS NAME, CITY, MOB  FOR PIN=803213 (show record with field NAME, CITY,
                                                                                                                                    MOB which has PIN=803213)
                GOTO 5                                                                                (GOTO command is used to set the pointer to record 5)               
DISPLAY                                                               (Display record 5 only)
DISPLAY NEXT 3                                                                (Display Record 5, 7 and 8)

Note:    
·      OFF clause can be included with DISPLAY and LIST command that hide the external Record # field on screen
·      We can print the record directly with just adding TO PRINTER clause with LIST or DISPLAY
Command.
Ex:
          DISPLAY ALL TO PRINTER              (It print the whole record and display it on screen)
          LIST TO PRINTER                               (It print the whole record and display it on screen)


USE command is used to specify on which Database file we are going to perform task.
GOTO command is used to set the pointer of record at specified record number.
        Syntax:           GOTO TOP or BOTTOM or [record no]

SET HEADING ON/OFF is used to hide or show the field name from list on screen.
SET STATUS ON/OFF command is used to turn on or off the status bar. Status bar situated at
bottom side off window. It show the name of open file and pointer of record.
SET DEFAULT provide facility to set the default directory to store files
                Ex:
                                SET DEFAULT TO D:                        (Set the Defalut Directory D:)
                                SET DEFAULT TO D:\FOX               (Set the Defalut Directory Fox under disk drive D:)

CLOSEing the database and FoxPro Windows QUIT

CLOSE DATABASE is used when we want to close the open database files.
CLOSE ALL is used to close all the open Database files as well as indexes and other open file.

·         To exit  form Fox pro window do on of the following-
a.       File menu-Exit option.
b.      Type QUIT in Command window.
QUIT command is used to close open window of FoxPro.


1 comment :

  1. Foxpro : List And Display >>>>> Download Now

    >>>>> Download Full

    Foxpro : List And Display >>>>> Download LINK

    >>>>> Download Now

    Foxpro : List And Display >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete