Open Method

Applies To:

Document Object

Description:

Open database or structure source or collection of sources.

Syntax:

void Open(BSTR path, long mode, BSTR password);

Remarks:

Path is a MolServer connect string, one of the following:
  • pathname of a single structure file (.cdx, .mol, .sdf, etc.)
  • pathname of a ChemFinder formfile (.cfw)
  • multiple filenames separated by pipe (|) characters
  • other driver-dependent string
Mode indicates how the database is to be opened.  Allowed values are: 
  • kMSNormal --- open for reading, change access temporarily when writing
  • kMSReadOnly --- open for read only, no writing permitted
  • kMSExclusive --- open for exclusive use: prevent others from writing, fail to open if already opened by another user. 
Password must be provided if database has a password.  If incorrect password is given, MolServer will throw an exception.  If database has no password, this argument should be a blank string.

Example:

See Also:

Close


2005 CambridgeSoft Corporation. All Rights Reserved. Privacy Statement
Tel  800 315-7300 / 617 588-9300     Fax  617 588-9390     Email   info@cambridgesoft.com
CambridgeSoft Corporation, 100 CambridgePark Drive, Cambridge, MA 02140 USA