Function EN Version 5.00

@ReplicateWithFieldProtection

Database NotesAdmin NotesSystem Replication

Syntax

@ReplicateWithFieldProtection(DBHANDLE1;DBHANDLE2;FNLIST3;FIELDNAMELIST1;FIELDNAMELIST2);
@ReplicateWithFieldProtection(DBHANDLE1;DBHANDLE2;FNLIST3;FIELDNAMELIST1;FIELDNAMELIST2;FNREPLICATIONFLAGS4);
@ReplicateWithFieldProtection(DBHANDLE1;DBHANDLE2;FNLIST3;FIELDNAMELIST1;FIELDNAMELIST2;FNREPLICATIONFLAGS4;FNLISTERROR5);

Description

Replicates the database referenced by DBHANDLE1 with the database referenced by DBHANDLE2. FNLIST3 contains the replication rights. The first element specifies the rights for replication in the first database, and the second element specifies the rights for the second database.
The databases do not have to be replicas of each other!

FIELDNAMELIST1 and FIELDNAMELIST2 can be used to specify field names whose values should be preserved in the respective database. During replication, these fields are not overwritten by fields with the same name from the other database.

TEXT/TEXTLIST FIELDNAMELIST1:
Specifies the names of the fields that should be preserved in the documents of DB1.
Fields with the same name from documents in DB2 are not transferred when replicating to DB1.

TEXT/TEXTLIST FIELDNAMELIST2:
Specifies the names of the fields that should be preserved in the documents of DB2.
Fields with the same name from documents in DB1 are not transferred when replicating to DB2.

A FNLIST is returned:

element   Meaning
1   UpdateCount DBHANDLE1
2   CreateCount DBHANDLE1
3   DeleteCount DBHANDLE1
4   UpdateCount DBHANDLE2
5   CreateCount DBHANDLE2
6   DeleteCount DBHANDLE2

FNLIST3:

Bit   HEX   Meaning
01   0001   Read
02   0002   Write
03   0004   Modify
04   0008   Delete

FNREPLICATIONFLAGS4
:

Bit   HEX   Meaning
01   0001   Localize links (Doc;View;DB) in databases with different replica IDs.

FNLISTERROR5:
When the optional return parameter FNLISTERROR5 is used, error statisics are returned in it.

Element   Meaning
1   Error UpdateCount DBHANDLE1
2   Error CreateCount DBHANDLE1
3   Error DeleteCount DBHANDLE1
4   Error UpdateCount DBHANDLE2
5   Error CreateCount DBHANDLE2
6   Error DeleteCount DBHANDLE2

Example: @ReplicateWithFieldProtection(DBHANDLE1;DBHANDLE2;FNLIST3;FIELDNAMELIST1;FIELDNAMELIST2)

DBHANDLE1:=@OpenDB("TESTRP1.NSF");
DBHANDLE2:=@OpenDB("TESTRP2.NSF");
FNLIST3:=@BitVektor(1:2:3:4);
FNLIST3:=FNLIST3:FNLIST3;
FIELDNAMELIST1:="TestFeldInDB1";
FIELDNAMELIST2:="";
@LogReport(@ReplicateWithFieldProtection(DBHANDLE1;DBHANDLE2;FNLIST3;FIELDNAMELIST1;FIELDNAMELIST2));
DBHANDLE2:=@CloseDB(DBHANDLE2);
DBHANDLE1:=@CloseDB(DBHANDLE1);

The database "TESTRP1.NSF" is replicated with the database "TESTRP2.NSF", and the result is output.
The fields, or the contents of the fields, named "TestFeldInDB1" are preserved in the documents of the database "TESTRP1.NSF".

Beispiel: @ReplicateWithFieldProtection(DBHANDLE1;DBHANDLE2;FNLIST3;FIELDNAMELIST1;FIELDNAMELIST2;FNREPLICATIONFLAGS4)

DBHANDLE1:=@OpenDB("TESTRP1.NSF");
DBHANDLE2:=@OpenDB("TESTRP2.NSF");
FNLIST3:=@BitVektor(1:2:3:4);
FNLIST3:=FNLIST3:FNLIST3;
FNREPLICATIONFLAGS4:=1;
FIELDNAMELIST1:="TestFeldInDB1";
FIELDNAMELIST2:="";
@LogReport(@ReplicateWithFieldProtection(DBHANDLE1;DBHANDLE2;FNLIST3;FIELDNAMELIST1;FIELDNAMELIST2;FNREPLICATIONFLAGS4));
DBHANDLE2:=@CloseDB(DBHANDLE2);
DBHANDLE1:=@CloseDB(DBHANDLE1);

The database "TESTRP1.NSF" is replicated with the database "TESTRP2.NSF", and the result is output. Local links are converted to the respective replica ID of the database.
The fields, or the contents of the fields, named "TestFeldInDB1" are preserved in the documents of the database "TESTRP1.NSF".

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