xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

DbJoin()

Merges records of two work areas into a new database.

Syntax

DbJoin( <cAlias>   , ;
        <cDatabase>, ;
       [<aFields>] , ;
       [<bFor>]      ) --> lSuccess

Arguments

<cAlias>
This a character string holding the alias name of the second work area to merge records of the current work area with.
<cDatabase>
This a character string holding name of the database file to create. It can include path and file extension. When no path is given, the file is created in the current directory. The default file extension is DBF.
<aFields>
A one dimensional array holding in its elements the field names of the fields to include in the resulting database. When this parameter is omitted, all fields of the primary and secondary work area are included. Use aliased field names to specify fields from the secondary work area.
<bFor>
An optional code block returning a logical value can be specified. It is evaluated for all records during the operation. Those records where <bFor> yields .T. (true) are included in the resulting database. If omitted, all records are

Return

The function returns .T. (true) on success, and .F. (false) on failure.

Description

DbJoin() is the functional equivalent of the JOIN command. Refer to JOIN for a detailed description of joining two databases into a new database.

Info

See also:JOIN
Category: Database functions , xHarbour extensions
Source:rdd\dbjoin.prg
LIB:xhb.lib
DLL:xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe