Click or drag to resize

IRelationIdentity Property

The primary key on the primary table. Is zero for new objects. Is set when an object is saved. This is the internal ID of the relation

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
int Identity { get; }

Property Value

Type: Int32
Long – The database internal ID of the relation (relation_id)

Implements

IModelBaseIdentity
Examples

Identity

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

VB
Dim objSO
Set objSO = CreateObject("SuperOffice.Application")
If not (objSO is nothing) Then
    id = objSO.CurrentRelation.Identity
    objSO.CurrentRelation.Comment = "This text been changed"
    result = MsgBox ("The text of the current relation has been changed, do you want to save these changes?", vbInformation + vbYesNo, "SuperCOM")
    if result = vbYes then
        objSO.CurrentRelation.ChangeIdentity(id)
    else
        objSO.CurrentRelation.CancelChanges()
        msgbox "The changes on the current relation where not saved", vbInformation + vbOkOnly, "SuperCOM"
    end if
else
    MsgBox "Unable to connect to database"
end if
Set objSO = Nothing

See Also