Difference between revisions of "OBJECTREAD()"

From Lianjapedia
Jump to: navigation, search
Line 9: Line 9:
  
 
==Description==
 
==Description==
The OBJECTREAD() function reads an external binary file into a Lianja Object field.  It returns .T. if the operation was successful, and .F. otherwise.  
+
The OBJECTREAD() function reads an external binary file into an Object field.  It returns .T. if the operation was successful, and .F. otherwise.  
  
The file to read in is specified in <filename>, and can be any valid Lianja/4GL expression that returns a valid file name. The first three characters of the file extension are stored in the Object field as the object's type, as returned by the OBJECTTYPE() function.
+
The file to read in is specified in <filename>, and can be any valid expression that returns a valid file name. The first three characters of the file extension are stored in the Object field as the object's type, as returned by the OBJECTTYPE() function.
  
The field into which the file is placed is specified in <object field>, and must be a Lianja Object field in the currently selected workarea.
+
The field into which the file is placed is specified in <object field>, and must be an Object field in the currently selected workarea.
  
 
==Example==
 
==Example==

Revision as of 13:21, 19 December 2012

Purpose

Function to read an external binary file into an object field

Syntax

OBJECTREAD(<filename>,<object field>)

See Also

BINCREATE(), BINCLOSE(), BINOPEN(), BINREAD(), BINWRITE(), OBJECTSIZE(), OBJECTTYPE(), OBJECTWRITE()

Description

The OBJECTREAD() function reads an external binary file into an Object field. It returns .T. if the operation was successful, and .F. otherwise.

The file to read in is specified in <filename>, and can be any valid expression that returns a valid file name. The first three characters of the file extension are stored in the Object field as the object's type, as returned by the OBJECTTYPE() function.

The field into which the file is placed is specified in <object field>, and must be an Object field in the currently selected workarea.

Example

? objectread('images/brickwall.gif',WALLPAPER)
.T.