4D v14.3

CLOSE DOCUMENT

Home

 
4D v14.3
CLOSE DOCUMENT

CLOSE DOCUMENT 


 

CLOSE DOCUMENT ( docRef ) 
Parameter Type   Description
docRef  DocRef in Document reference number

CLOSE DOCUMENT closes the document specified by docRef.

Closing a document is the only way to ensure that the data written to a file is saved. You must close all the documents you open with the commands Open document, Create document or Append document.

Example  

The following example lets the user create a new document, writes the string “Hello” into it, and closes the document:

 C_TIME(vhDocRef)
 vhDocRef:=Create document("")
 If(OK=1)
    SEND PACKET(vhDocRef;"Hello") ` Write one word into the document
    CLOSE DOCUMENT(vhDocRef` Close the document
 End if

 
PROPERTIES 

Product: 4D
Theme: System Documents
Number: 267

 
HISTORY 

Created: < 4D v6

 
SEE ALSO 

Append document
Create document
Open document

 
ARTICLE USAGE

4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)