Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>dbrselect()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DBRSELECT()


Syntax:     DBRSELECT(<expN>)

Purpose:    To determine the target work area of a specified relation
            defined in the current work area.

Argument:   <expN> is the ordinal position in the list of relations
            defined.

Returns:    An integer numeric value.

            DBRSELECT() returns the work area number of the relation
            specified by <expN>.  If there is no RELATION SET for
            <expN>, DBRSELECT() returns zero.

            To obtain the alias of the relation use the expression:

            ALIAS(DBRSELECT(<expN>))

Usage:      DBRSELECT() is used in combination with DBRELATION() to
            query the work area and linking expression of an existing
            relation.  Using these functions along with DBFILTER(), you
            can create a user-defined View system analogous to that of
            the Clipper utility, DBU.EXE.  Essentially, you utilize
            these functions to create the View definition from the
            environment.

Library:    CLIPPER.LIB


----------------------------------- Example --------------------------------

   USE Customer INDEX Customer
   SELECT 2
   USE Invoices INDEX Invoices
   SELECT 3
   USE BackOrder INDEX BackOrder
   SELECT 1
   SET RELATION TO Cust_num INTO Customer;
      TO Cust_num INTO BackOrder
   ? DBRELATION(2)                     && Result: Cust_num
   ? DBRSELECT(2)                      && Result: 3
   ? ALIAS(DBRSELECT(2))               && Result: BACKORDER


See Also: SET RELATION DBFILTER() DBRELATION()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson