xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

DbFileGet()

Copies data from a field into an external file.

Syntax

DbFileGet( <nFieldPos>, <cTargetFile>, <nMode> ) --> lSuccess

Arguments

<nFieldPos>
A numeric value specifying the ordinal position of the field to copy. Valid values are in the range from 1 to FCount().
<cTargetFile>
Character string holding the name of the external file to copy a field's data to. The file name may include drive and directory and must include an extension. The file is created if it does not exist. Otherwise, the function attempts to open the file exclusively. When this fails, NetErr() is set to .T. (true).
<nMode>
The parameter triggers if a new file is created or data is appended to a file. The following constants from DBINFO.CH must be used:

Constants for the append mode
ConstantValueDescription
FILEGET_APPEND1Appends data to the file.
FILEGET_OVERWRITE0Overwrites file with data.

Return

The return value is .T. (true) when the operation is successful, otherwise .F. (false) is returned.

Description

The DbFileGet() and DbFilePut() functions are mainly used to transfer data between memo fields holding large amounts of data (BLOB) and external files. Data written to an external file is then programmatically processed.

Info

See also:BlobDirectExport(), BlobExport(), DbFilePut()
Category: Database functions , Field functions
Header:Dbinfo.ch
Source:rdd\dbcmd.c
LIB:xhb.lib
DLL:xhbdll.dll


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