WRITE_CLIENT_FILE function [String]

Creates and writes to a file on the client computer.

Syntax
WRITE_CLIENT_FILE( filename, blob-expression [, 'A' ] )
Parameters
  • filename   The name of the file on the client computer. The name is resolved on the client computer relative to the current working directory of the client application.

  • blob-expression   A binary string to be written to filename on the client computer.

  • A   By default, if the file already exists, it is overwritten. If you want the data to be appended to existing data, specify 'A'. If the file does not already exist, and you specify 'A', the file is still created.

Returns

INT

Remarks

The database server converts filename from the database character set to the client character set. On the client computer, filename is then converted to the operating system character set.

Since the data is a binary string, if you want the data to be in a particular character set, or compressed, or encrypted, you must perform these operations on the data before sending it to the WRITE_CLIENT_FILE function.

Reading of the file is performed by the client software library and the transfer of data is done using the command sequence communication protocol.

Permissions

When writing to a file on a client computer:

See also
Standards and compatibility
  • SQL/2003   Vendor extension.