xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

DbUpdate()

Updates records in the current work area from a second work area.

Syntax

DbUpdate( <cAlias>     , ;
          <bReplace>   , ;
          <bExpression>, ;
         [<lRandom>]     ) --> lSuccess

Arguments

<cAlias>
This is a character string holding the the alias name of the second work area used update the current work area.
<bReplace>
This code block must contain the assignment operations for updating fields.
<bExpression>
This is a code block whose return value is searched in the second work area to find the records for updating the current work area. The current work area must be indexed or sorted in <bExpression> order.
<lRandom>
When <lRandom> is set to .T. (true) records in the <cAlias> work area can be in any order. The default is .F. (false), so thath the <cAlias> work area must be sorted or indexed in <bExpression> order.

Return

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

Description

DbUpdate() is the functional equivalent of the UPDATE command. Refer to UPDATE for a detailed description of updating records from a second database file.

Info

See also:DbEval(), DbSort(), DbTotal(), FieldPut(), INDEX, OrdCreate(), SUM, UPDATE
Category: Database functions , xHarbour extensions
Source:rdd\dbupdat.prg
LIB:xhb.lib
DLL:xhbdll.dll


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