Platform SDK: Exchange 2000 Server

Save Method

[This is preliminary documentation and subject to change.]

Saves data into the currently bound data source.

[Visual Basic,VBScript]
Sub Save()
[C++]
HRESULT Save();
[IDL]
HRESULT Save();

Remarks

After binding to a data source, such as another object or an item in the Web Store, call Save to commit changes back to the data source. This method raises the CDO_E_NOT_OPENED exception if there is currently no bound data source. If you bind an object in the Web Store, you must have opened it explicitly with the adModeReadWrite (3) flag set. If not, you will receive an access denied error (E_ACCESSDENIED).

Changes that must be committed using the Save method include both changes to properties within an object's Fields collection as well as changes to an object's stream (where applicable). That is, calling Fields.Update on an object exposing the IDataSource interface does not commit the property changes to the underlying data source.

Invocations of the Save method are not recursive. That is, if you have a chain of open objects, calling Save on one only saves the changes back to object bound to that object. For example, if you use Message object A to open Message object B, and then you use Message object B to open Message object C, calling Save on Message A only commits the changes into Message B.

See Also

IDataSource.OpenObject, IDataSource.Open, IDataSource.SaveTo, IDataSource.SaveToObject, IDataSource.SaveToContainer