Function EN Version 4.60

@GetPosAttachedFile

Attachments Database Export Import Note

Syntax

@GetPosAttachedFile(OBJECTFILEHANDLE1);

Description

Returns the current position in the file attachment with the OBJECTFILEHANDLE OBJECTFILEHANDLE1 is returned.

Example: @GetPosAttachedFile(OBJECTFILEHANDLE1)

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

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

MODE3:="S";
POSITION2:=10;
RetPos:=@SetPosAttachedFile(OBJECTFILEHANDLE1;POSITION2;MODE3)

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

ActPos:=@GetPosAttachedFile(OBJECTFILEHANDLE1)

OBJECTFILEHANDLE1:=@CloseAttachedFile(OBJECTFILEHANDLE1);

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

The DB mit dem OSPATH "TESTDB\\TESTDB1.NSF" is opened.
The document with the NOTEID 8450 is opened.
The first file attachment of this document is opened.
The file attachment position is set to the byte following the 10th byte.
The next 10 bytes of this file attachment are read as TEXT read and output in the APILOG is output.
The current file attachment position after reading is queried and assigned to ActPos is assigned.
The file attachment is closed again.
The document is closed again.
The DB is closed again.
Sets the position to 10 bytes after the beginning ("S") of the file "C:\\TEST.TXT" und liest 10 Bytes.

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