Click or drag to resize

IAppointments2Exists Method

Returns true if the given item exists in the collection

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
bool Exists(
	int Id
)

Parameters

Id
Type: SystemInt32

Return Value

Type: Boolean

Implements

IMapCollectionExists(Int32)
Examples

This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information.

VB
Dim soDB, myApnt, myApnts
Set soDB = CreateObject("SuperOfficeDB.Database")

If not (soDB is nothing) Then

   soDB.Login "USERNAME", "PASSWORD"

    Set myApnt = sodb.GetAppointment(3)
    Set links = myApnt.ActivityLinks
    links.AddAppointment sodb.GetAppointment(4)
    links.AddAppointment sodb.GetAppointment(5)
    myApnt.Save
    Set appnt = links.Appointments
    If Not myApnts.Empty Then
        msg = msg & "Number of appointments: " & myApnts.Count & vbCrLf
        For i = 0 To myApnts.Count - 1
            msg = msg & myApnts.Item(i).Description & vbCrLf
        Next
        If myApnts.Exists(1) Then msg = msg & "There is an appointment with id = 1."
        MsgBox msg
    Else
        MsgBox "There are no appointments in this collection"
    End If

else
    MsgBox "Unable to connect to database"
end if
Set objSO = Nothing

See Also