Function EN Version 4.60

@CloseAttachedFile

Attachments Database Export Import Note

Syntax

@CloseAttachedFile(OBJECTFILEHANDLE1);

Description

Closes the file attachment with the OBJECTFILEHANDLE OBJECTFILEHANDLE1 and returns the closed OBJECTFILEHANDLE back.

Example: @CloseAttachedFile(OBJECTFILEHANDLE1)

DBHANDLE1:=@OpenDB("TESTDB\\TESTDB1.NSF");
NOTEID:=8450;
NOTEHANDLE1:=@OpenNoteByID(DBHANDLE1;NOTEID;NOTEHANDLE1);

FNATTACHMENTNUMBER2:=1;
MODE3:="RB";
OBJECTFILEHANDLE1:=@OpenAttachedFile(NOTEHANDLE1;FNATTACHMENTNUMBER2;MODE3);

READ_TEXT:=@ReadAttachedFile(OBJECTFILEHANDLE1;"A";10);
@LogReport(READ_TEXT);
OBJECTFILEHANDLE1:=@CloseAttachedFile(OBJECTFILEHANDLE1);

NOTEHANDLE1:=@CloseNote(NOTEHANDLE1;0);
DBHANDLE1:=@CloseDB(DBHANDLE1);

The DB with the OSPATH "TESTDB\\TESTDB1.NSF" is opened.
The document with the NOTEID 8450 is opened.
The first file attachment of this document is opened.
The first 10 bytes of this file attachment are read as TEXT and stored in APILOG fromgegeben.
The file attachment is closed again.
The document is closed again.
The DB is wiethe closed.

Note : This text was machine-translated and may contain inaccuracies.