Function EN Version 1.90

@SetNoteOID

Note NotesSystem

Syntax

@SetNoteOID(NOTEHANDLE1;OID2);

Description

Sets in the document identified by NOTEHANDLE NOTEHANDLE the OID to OID OID2.
This @Function can only be applied to newly created documents within this DB.

Example: @SetNoteOID(NOTEHANDLE1;OID2)

DBHANDLE1:=@OpenDB("TEST.NSF");
DBHANDLE2:=@OpenDB("TEST2.NSF");
VIEWHANDLE:=@OpenView(DBHANDLE1;"TEST VIEW");
VIEWPOSITION:=1:1:1:0:0:0:0:0:0:0;
NOTEHANDLE1:=@OpenNoteByPosition(DBHANDLE1;VIEWHANDLE;VIEWPOSITION;NOTEHANDLE1);
Ret:=@SetNoteDB(NOTEHANDLE1;DBHANDLE2);
@SetNoteID(NOTEHANDLE1;0);
@SetNoteOID(NOTEHANDLE1;@ZeroOID);
NOTEHANDLE1:=@CloseNote(NOTEHANDLE1;0);
VIEWHANDLE:=@CloseView(VIEWHANDLE);
DBHANDLE1:=@CloseDB(DBHANDLE1);
DBHANDLE2:=@CloseDB(DBHANDLE2);

Two databases, source and target, are opened. A document is searched for and opened, its DBHANDLE is set to DBHANDLE2, thereby copying the document into the target database. The document is then closed again, and finally both databases are closed again.
For such a copy operation to work, both the NOTEID and the OID must be set to 0.
@ZeroOID
returns a zero OID for this purpose, for example.

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