xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

DbFilePut()

Copies the contents of an external file into a field.

Syntax

DbFilePut( <nFieldPos>, <cSourceFile> [,<Mode>] ) --> lSuccess

Arguments

<nFieldPos>
A numeric value specifying the ordinal position of the field to copy to. Valid values are in the range from 1 to FCount().
<cSourceFile>
A character string holding the name of the external file to copy into the field. The file name may include drive and directory and must include an extension. If the file does not exist, a runtime error is raised. The function attempts to open the file in shared mode. When this fails, NetErr() is set to .T. (true).
<nMode>
The parameter triggers how the contents of the file is stored in the field. The following constants from DBINFO.CH can be used:

Constants for the import mode
ConstantValueDescription
FILEPUT_COMPRESS1Data is compressed
FILEPUT_ENCRYPT2Data is encrypted

Return

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

Description

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

Info

See also:BlobDirectImport(), BlobImport(), DbFileGet()
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