Partager via


Save Method

Save Method

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Saves data into the currently bound data source.

Applies To

IDataSource Interface

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In

CDOEX.DLL

Syntax

[Visual Basic]Sub Save
()

[C++]HRESULT Save ();

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

After binding to a data source, such as another object or an item in the Exchange 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 Exchange 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 and 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

OpenObject Method

Open Method

SaveTo Method

SaveToObject Method

SaveToContainer Method

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.