/*
 * $Id: rdd.txt,v 1.1.1.1 2001/12/21 10:48:56 ronpinkas Exp $
 */

/*
 * The following parts are Copyright of the individual authors.
 * www - http://www.harbour-project.org
 *
 * Copyright 1999 Luiz Rafael Culik <culik@sl.conex.net>
 *    DB*() documentation
 *    ORD*() documentation
 *    RDD*() documentation
 *
 * See doc/license.txt for licensing terms.
 *
 */


/*  $DOC$
 *  $FUNCNAME$
 *      RDDLIST()
 *  $CATEGORY$
 *      Database
 *  $ONELINER$
 *      Return an array of the available Replaceable Database Drivers
 *  $SYNTAX$
 *      RDDLIST([<nRDDType>]) --> aRDDList
 *  $ARGUMENTS$
 *     <nRDDType> is an integer that represents the type of the RDD you
 *   wish to list.  The constants RDT_FULL and RDT_TRANSFER represent the two
 *   types of RDDs currently available.
 *
 *   RDDType Summary
 *   
 *   Constant       Value     Meaning
 *   
 *   RDT_FULL       1         Full RDD implementation
 *   RDT_TRANSFER   2         Import/Export only driver
 *   
 *
 *     RDT_FULL identifies full-featured RDDs that have all the capabilities
 *   associated with an RDD.
 *
 *     RDT_TRANSFER identifies RDDs of limited capability.  They can only
 *   transfer records between files.  You cannot use these limited RDD
 *   drivers to open a file in a work area.  The SDF and DELIM drivers are
 *   examples of this type of RDD.  They are only used in the implementation
 *   of APPEND FROM and COPY TO with SDF or DELIMITED files.
 *  $RETURNS$
 *     RDDLIST() returns a one-dimensional array of the RDD names registered
 *   with the application as <nRDDType>.
 *  $DESCRIPTION$
 *     RDDLIST() is an RDD function that returns a one-dimensional array that
 *   lists the available RDDs.
 *
 *     If you do not supply <nRDDType>, all available RDDs, regardless of type,
 *   are returned.
 *  $EXAMPLES$
 *     In this example RDDLIST() returns an array containing the
 *      character strings, "DBF", "SDF", "DELIM", "DBFCDX", and "DBFNTX":
 *
 *      REQUEST DBFCDX
 *
 *      .
 *      . < statements >
 *      .
 *
 *      aRDDs := RDDLIST()
 *
 *            // Returns {"DBF", SDF", "DELIM", "DBFCDX", "DBFNTX" }
 *
 *     In this example, RDDLIST() returns an array containing the
 *      character strings, "SDF" and "DELIM":
 *
 *      #include "rddsys.ch"
 *      .
 *      . < statements >
 *      .
 *      aImpExp := RDDLIST( RDT TRANSFER )
 *
 *  $TESTS$
 *
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *
 *  $SEEALSO$
 *
 *  $INCLUDE$
 *      RDDSYS.CH
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      RDDNAME()
 *  $CATEGORY$
 *      Database
 *  $ONELINER$
 *      Return the name of the currently active RDD
 *  $SYNTAX$
 *      RDDNAME() --> cRDDName
 *  $ARGUMENTS$
 *
 *  $RETURNS$
 *      Returns a character string, cRDDName, the registered name of the active
 *   RDD in the current or specified work area.
 *  $DESCRIPTION$
 *      RDDNAME() is an RDD function that returns a character string, cRDDName,
 *   the name of the active RDD in the current or specified work area.
 *
 *      You can specify a work area other than the currently active work area by
 *   aliasing the function.
 *  $EXAMPLES$
 *   USE Customer VIA "DBFNTX" NEW
 *   USE Sales    VIA "DBFCDX" NEW
 *
 *   ? RDDNAME()                          // Returns: DBFCDX
 *   ? Customer->( RDDNAME() )            // Returns: DBFNTX
 *   ? Sales->( RDDNAME() )               // Returns: DBFCDX
 *  $TESTS$
 *
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *
 *  $SEEALSO$
 *      RDDLIST()
 *  $INCLUDE$
 *
 *  $END$
 */

/*  $DOC$
 *  $FUNCNAME$
 *      RDDSETDEFAULT()
 *  $CATEGORY$
 *      Database
 *  $ONELINER$
 *      Set or return the default RDD for the application
 *  $SYNTAX$
 *      RDDSETDEFAULT([<cNewDefaultRDD>])
 *      --> cPreviousDefaultRDD
 *
 *  $ARGUMENTS$
 *      <cNewDefaultRDD> is a character string, the name of the RDD that is
 *   to be made the new default RDD in the application.
 *  $RETURNS$
 *      RDDSETDEFAULT() returns a character string, cPreviousDefaultRDD, the
 *   name of the previous default driver.  The default driver is the driver
 *   that HARBOUR uses if you do not explicitly specify an RDD with the
 *   VIA clause of the USE command.
 *  $DESCRIPTION$
 *      RDDSETDEFAULT() is an RDD function that sets or returns the name of the
 *   previous default RDD driver and, optionally, sets the current driver to
 *   the new RDD driver specified by cNewDefaultRDD.  If <cNewDefaultDriver>
 *   is not specified, the current default driver name is returned and
 *   continues to be the current default driver.
 *
 *    This function replaces the DBSETDRIVER() function.
 *  $EXAMPLES$
 *   // If the default driver is not DBFNTX, make it the default
 *
 *   IF ( RDDSETDEFAULT() != "DBFNTX" )
 *      cOldRdd := RDDSETDEFAULT( "DBFNTX" )
 *   ENDIF
 *  $TESTS$
 *
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *
 *  $SEEALSO$
 *      DBSETDRIVER()
 *  $INCLUDE$
 *
 *  $END$
 */


/*  $DOC$
 *  $FUNCNAME$
 *      __RDDSETDEFAULT()
 *  $CATEGORY$
 *      Database
 *  $ONELINER$
 *      Set or return the default RDD for the application
 *  $SYNTAX$
 *      __RDDSETDEFAULT([<cNewDefaultRDD>])
 *      --> cPreviousDefaultRDD
 *
 *  $ARGUMENTS$
 *      <cNewDefaultRDD> is a character string, the name of the RDD that is
 *      to be made the new default RDD in the application.
 *  $RETURNS$
 *      __RDDSETDEFAULT() returns a character string, cPreviousDefaultRDD, the
 *      name of the previous default driver.  The default driver is the driver
 *      that HARBOUR uses if you do not explicitly specify an RDD with the
 *      VIA clause of the USE command.
 *  $DESCRIPTION$
 *      RDDSETDEFAULT() is an RDD function that sets or returns the name of the
 *      previous default RDD driver and, optionally, sets the current driver to
 *      the new RDD driver specified by cNewDefaultRDD.  If <cNewDefaultDriver>
 *      is not specified, the current default driver name is returned and
 *      continues to be the current default driver.
 *
 *      This function replaces the DBSETDRIVER() function.
 *  $EXAMPLES$
 *      // If the default driver is not DBFNTX, make it the default
 *
 *      IF ( __RDDSETDEFAULT() != "DBFNTX" )
 *           cOldRdd := __RDDSETDEFAULT( "DBFNTX" )
 *      ENDIF
 *  $TESTS$
 *
 *  $STATUS$
 *      R
 *  $COMPLIANCE$
 *
 *  $SEEALSO$
 *      DBSETDRIVER()
 *  $INCLUDE$
 *
 *  $END$
 */


