Selasa, 01 November 2011

Work Area and Alias Name

Before discussing the work area and the name of an alias on the USE instruction, then it will be discussed in advance the understanding of each

Work Area is a part of a predetermined memory for storing data in a database file. In professional foxbase LAN, the user / programming can enable the database files in 10 work areas chosen. The work area is marked with the letters A - J or with numbers 1 -10.

At the beginning of time, then the selected work area is the working area 1 or A. To activate a selected work area to use instructions
SELECT<work area : alias>

In relation to the alias database file is given a different name for the database file for purposes of manipulation or programming. By the time a database fie formed, then the alias will automatically be given the same name with the name of the database file.

In relation with instruction SELECT, then the alias name of a database file can be used to select the work area
Example :
SELECT 1 Or SELECT A

In relation with instruction in above :
SELECT 1
USE scmaster
Or
SELECT scmaster
USE scmaster
OR
USE SCMASTER IN 3

Ex ALIAS in reltion with instruction USE :
USE SCMASTER alias name IN 3

If the work area that is actively working one, and the desired access CD_PRD field in the work area 3, then use a command like this:
SCMASTER>cd_prd
Or
C->cd_prd
Or
C.cd_prd
Or
SCMASTER.cd_prd

In relation to the variable memory, a variable memory alias is used to distinguish between the field name with the name of the memory variable
Ex :
field name : cd_prd
memory variable name : m-cd_prd or m.cd_prd

A related function is a function with a USE instruction DBF (). These functions are used to find out the name of the database file in the selected area :
Syntax : DBF([<alias>])
Ex :
USE scmaster
?DBF()
c:\foxproln\scmaster.dbf


SELE 3
USE scmaster
SELE 1
?DBF(3)
c:\foxproln\scmaster.dbf

To close a database file, using a USE instruction without any selection. These instructions will only close the database file at that time the work area only, while to shut down all database files on all areas of work, and restore the work area at a working area 1 used instructions CLOSE

0 komentar:

Posting Komentar

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More