Function : Clusters; Database

NSFDbOpenExtended - Open database or database template with additional options.
----------------------------------------------------------------------------------------------------------

#include <nsfdb.h>

STATUS LNPUBLIC NSFDbOpenExtended(
const char far *PathName,
WORD Options,
DHANDLE hNames,
TIMEDATE far *ModifiedTime,
DBHANDLE far *rethDB,
TIMEDATE far *retDataModified,
TIMEDATE far *retNonDataModified);

Description :

This function opens a Domino database or database template on the local system or on a remote Lotus Domino Server. NSFDbOpenExtended allows you to open a Domino database with a scan lock (Domino-based file "coordination"), open a local database with a specified UserName (hNames parameter), initiate purge or fixup operations during the open, and/or conditionally open the database only if it has changed since a supplied time/date.

This function can also be used to open a directory on the local system or on a remote Lotus Domino Server.

NSFDbOpenExtended will not succeed on a directory when used with certain DBOPEN_xxx options. Refer to DBOPEN_xxx for details.
Parameters :

Sample Usage :


  /* Create a skim date and check Last Modified date during open */

  OSCurrentTIMEDATE(&open_skim_td);
  if(TimeDateAdjust(&open_skim_td, 0, 0, 0, WEEK_AGO, 0, 0))
  {
      printf("\nTimedateAdjust() failed\n");
      goto Exit;
  }

  /* Open source database */

  if (error_status = NSFDbOpenExtended(src_name,
                         DBOPEN_WITH_SCAN_LOCK, NULLHANDLE,
                         &open_skim_td, &db_handle_src,
                         &data_td_src, &nondata_td_src))
  {
      if (ERR(error_status) == ERR_NO_MODIFIED_NOTES)
      {
          printf("\nSrc Db: %s has not been modified in a week.\n",
                 src_name);
          if (error_status = NSFDbOpenExtended(src_name,
                         DBOPEN_WITH_SCAN_LOCK, NULLHANDLE,
                         NULL, &db_handle_src,
                         &data_td_src, &nondata_td_src))
             goto Exit;

      }
      else
          goto Exit;
  }
  cleanup_state += CLOSE_SRC_DB;



See Also :

DBOPEN_xxx
----------------------------------------------------------------------------------------------------------