Function : Database

NSFDbReplicaInfoSet - Set the database's DBREPLICAINFO structure.
----------------------------------------------------------------------------------------------------------

#include <nsfdb.h>

STATUS LNPUBLIC NSFDbReplicaInfoSet(
DBHANDLE hDB,
DBREPLICAINFO far *ReplicationInfo
);

Description :

This function sets the given database's DBREPLICAINFO structure.

Use this function to set specific values, such as the replica ID, in the header data of a database. To create a new replica copy of a given database, for example, you must first create the new database using the NSFDbCreate, then get the replica ID of the source database via NSFDbReplicaInfoGet, then set this replica ID into the new database via NSFDbReplicaInfoSet.

You may also use NSFDbReplicaInfoSet to set values such as the replication flags in the header of the database. See the symbolic value REPLFLG_xxx for specific replication settings.


Parameters :

Sample Usage :

 
  /* Cast the changes in stone */

 if (error_status = NSFDbReplicaInfoSet(db_handle_dst,
                                         &replica_info_dst))
      goto Exit;


See Also :

NSFDbReplicaInfoGet
----------------------------------------------------------------------------------------------------------