xHarbour Reference Documentation > Function Reference |
Retrieves or changes the default replaceable database driver.
RddSetDefault( [<cNewRDD>] ) --> cOldRDD
The function returns a character string holding the name of the RDD selected as default RDD before the function is called. If <cNewRDD> is specified and an RDD of this name does not exist, a runtime error is raised.
RddSetDefault() queries or changes the default replaceable database driver. The default RDD is used to open or create database and index files in a work area when the VIA clause of the USE command is omitted.
Note: some RDDs, such as DBFCDX, for example, must be linked explicitly to an xHarbour application using the REQUEST statement.
See also: | RddInfo(), RddList(), RddName(), REQUEST |
Category: | Database drivers |
Source: | rdd\dbcmd.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example REQUESTs the DBFCDX driver, opens a database // with DBFNTX and then changes the default RDD. REQUEST DBFCDX PROCEDURE Main ? RddSetDefault() // result: DBFNTX USE Customer ALIAS Cust ? RddSetDefault( "DBFCDX" ) // result: DBFNTX USE Orders ALIAS Ord NEW ? RddSetDefault() // result: DBFCDX ? RddMame() // result: DBFCDX ? Cust->( RddName() ) // result: DBFNTX ? Ord-> ( RddName() ) // result: DBFCDX CLOSE ALL RETURN
http://www.xHarbour.com