Click or drag to resize

IAddressCountryId Property

The Country id of the address owner (the contact or person object) The contact or contact persons internal country id. By using the OLE DB Provider, all the properties of the country table are available

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

Property Value

Type: Int32
Long – the database internal id of the country (country_id)
Examples

Show address of ownercompany

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

VB
set objso = CreateObject("superofficedb.database")
if objso.login("<USERNAME>", "<PASSWORD>") then
    set contact = objso.GetContact(objso.OwnerContactId)
        msg = msg & "************* Street address *************" & vbCrLf
        msg = msg & "Address1: " &  contact.StreetAddress.Address1 & vbcrlf  
        msg = msg & "Address2: " &  contact.StreetAddress.Address2 & vbcrlf  
        msg = msg & "Address3: " &  contact.StreetAddress.Address3 & vbcrlf 
        msg = msg & "AddressId: " &  contact.StreetAddress.AddressId & vbcrlf 
        msg = msg & "City: " &  contact.StreetAddress.City & vbcrlf 
        msg = msg & "CountryId: " &  contact.StreetAddress.CountryId & vbcrlf 
        msg = msg & "County: " &  contact.StreetAddress.County & vbcrlf 
        msg = msg & "FormattedAddress: " &  contact.StreetAddress.FormattedAddress & vbcrlf
        msg = msg & "State: " &  contact.StreetAddress.State & vbcrlf 
        msg = msg & "Type: " &  contact.StreetAddress.Type & vbcrlf  
        msg = msg & "TypeIdx: " &  contact.StreetAddress.TypeIdx & vbcrlf 
        msg = msg & "ValidFrom: " &  contact.StreetAddress.ValidFrom & vbcrlf 
        'bug id 6147
        'msg = msg & "ValidTo: " &  contact.StreetAddress.ValidTo() & vbcrlf 
        msg = msg & "ZipCode: " &  contact.StreetAddress.ZipCode & vbcrlf  
        msg = msg & "************* Postal address *************" & vbCrLf
        msg = msg & "Address1: " &  contact.PostalAddress.Address1 & vbcrlf  
        msg = msg & "Address2: " &  contact.PostalAddress.Address2 & vbcrlf  
        msg = msg & "Address3: " &  contact.PostalAddress.Address3 & vbcrlf 
        msg = msg & "AddressId: " &  contact.PostalAddress.AddressId & vbcrlf 
        msg = msg & "City: " &  contact.PostalAddress.City & vbcrlf 
        msg = msg & "CountryId: " &  contact.PostalAddress.CountryId & vbcrlf 
        msg = msg & "County: " &  contact.PostalAddress.County & vbcrlf 
        msg = msg & "FormattedAddress: " &  contact.PostalAddress.FormattedAddress & vbcrlf
        msg = msg & "State: " &  contact.PostalAddress.State & vbcrlf 
        msg = msg & "Type: " &  contact.PostalAddress.Type & vbcrlf  
        msg = msg & "TypeIdx: " &  contact.PostalAddress.TypeIdx & vbcrlf 
        msg = msg & "ValidFrom: " &  contact.PostalAddress.ValidFrom & vbcrlf 
        'bug id 6147
        'msg = msg & "ValidTo: " &  contact.PostalAddress.ValidTo & vbcrlf 
        msg = msg & "ZipCode: " &  contact.PostalAddress.ZipCode & vbcrlf  
    msgbox msg, ,"SuperCOM"
else
    MsgBox "Unable to connect to database"
end if
Set objSO = Nothing

See Also