Function EN Version 1.90

@CopyDB

Database Note

Syntax

@CopyDB(NOTESPATH1;DBCLASS2;OVERWRITE3;DBHANDLE4;SINCE5;NOTECLASSES6;REPLICA7);

Description

Copies the database with the DBHANDLE DBHANDLE4 to a database with the NOTESPATH NOTHESPATH1 and the DBCLASS DBCLASS2 and returns a DBHANDLE to it.

The documents matching the specification in NOTECLASSES NOTECLASSES6 match from the time TD SINCE5 are copied. If the documents are to be copied regardless of their creation date, the @function @AnyAllDay the matching time-date value (see @AnyDay/@AllDay/@AnyAllDay).

With FN OVERWRITE3 and FN REPLICA7 can be used to influence the way the copy is made.

DBCLASS2:
"NSF"   Standard database
"NSG"   Giant database 200 MB
"NSH"   Huge database 300 MB
"NTF"   Template database
"NSX"   Test database
"DSK"   Desktop database
"NCF"   Notes Clipboard database

OVERWRITE3:
0   Do not overwrite if already present
1   Overwrite if already present

NOTECLASSES6:
DEC   BIT   Meaning

00000   XX   No Notes   no documents
00001   01   Documents   data documents
00002   02   Policy-Note   database policy document
00004   03   Form-Note   form design documents
00008   04   View-Note   view design documents
00016   05   Icon-Note   icon document
00032   06   Design-Collection-Note   view documents
00064   07   ACL-Info-Note   ACL info document (not the ACL itself)
00128   08   Help-Index-Note   
00256   09   Help-Note   help database document
00512   10   Filter-Note   macro design documents
01024   11   Field-Note   field design documents
02048   12   Replication-Note   replication documents

32768   16   Default-Note of Each   the default document of each

32767   01-15   Notes   all documents
32766   02-15   All Non-Document-Notes   all non-data documents

(To specify several document classes, the values of the relevant classes are added or combined using @BitVektor)

REPLICA7:
0   No replica copy
1   replica copy

Example: @CopyDB(NOTESPATH1;DBCLASS2;OVERWRITE3;DBSCRHANDLE4;SINCE5;NOTECLASSES6;REPLICA7);
DBHANDLE1:=@OpenDB("TEST1.NSF");
DBHANDLE2:=@CopyDB("TEST2.NSF";"NSF";0;DBHANDLE1;@AnyAllDay;32767;0);
DBHANDLE2:=@CloseDB(DBHANDLE2);
DBHANDLE1:=@CloseDB(DBHANDLE1);

The database "TEST1.NSF" is copied to a standard database "TEST2.NSF" in the Notes data directory with all documents. If a database with the same name already exists at this location, the @function is aborted; otherwise, the database is closed. No replica copy is created.

Attention! The ACL must be copied with the @CopyACL command or set accordingly via @SetACL!

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