diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4718B87C-0FFF-48EC-A47F-5C9F8C2E2A51.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4718B87C-0FFF-48EC-A47F-5C9F8C2E2A51.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,95 @@ + + +IDataSource.Add()

IDataSource.Add()

+

Description:

+

The Add method creates a new calendar on the device +or adds an entry to a calendar. In the latter case, if an entry with the same LocalId already +exists in the calendar, it is modified accordingly. You can thus use this +method to both add and update calendar entries. The entry is added to the +specified calendar or, if no calendar is specified, to the default one. If +the default calendar does not exist, it is created.

+

This is a synchronous method.

+

Syntax:

+
result = so.IDataSource.Add(criteria);
+ +

Arguments:

+ +

Return value:

+

The Add method returns an object that contains +an error code and an error message. In addition, if a calendar entry was added +or updated, the result object contains the id of that +entry.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for Add
+

Property

+
+

Description

+
+

Value

+
+

[result.ReturnValue]

+
+

This is a text string that contains the id of the +entry that was added or updated.

+

If a new calendar was created, this property is not included in the +result object.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Calendar Service API error messages.

+
+

Remarks:

+
    +
  • If an entry is added or updated to a calendar other than +the default one, the corresponding calendar file must exist on the device.

    +
  • +
  • For detailed information about calendar entries, see section Calendar entries.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the full example.

+ + +
\ No newline at end of file