 ACT! SDK
  ACT! SDKoDatabase = CreateObject("ACTOLE.DATABASE")
oDatabase.Open(dbName)
If oDatabase.IsOpen 
    oSales = oDatabase.SALES
    'New Sales record
    oSales.Add
    oSales.Data SLF_SaleStartDate, startDate
    oSales.Data SLF_SaleDate, closedate
    'These need to be IDs from the List 
table
    oSales.Data SLF_ProductId, sProductId
    'These need to be IDs from the List 
table
    oSales.Data SLF_TypeId, sTypeId
    oSales.Data SLF_Units, 100
    oSales.Data SLF_UnitPrice,2.25
    oSales.Data SLF_Amount, 225.00
    oSales.Data SLF_Probability, 65
    'These need to be IDs from the List table
    oSales.Data SLF_CompetitorId, CompetitorId
    oSales.Data SLF_SalesStage, " Confirmed order on phone, 
waiting for written order"
    'Update the contents of the record
    uniqueID = oSales.Update
    oSales.GoTo (uniqueID)
    If oSales.Error 
        MesssageBox oSales.LastError
    EndIf
    'Make the association between a 
contact and an activity
    oSales.AssociateWithContact sContactId
    oSales.AssociateWithGroup sGroupId
    Set oSales = Nothing
EndIf
oDatabase = null
Set objDatabase = CreateObject("ACTOLE.DATABASE")
objDatabase.Open dbName
If objDatabase.IsOpen Then
    Set objSales = objDatabase.SALES
    'New Sales record
    objSales.Add
    objSales.Data SLF_SaleStartDate, startDate
    objSales.Data SLF_SaleDate, closedate
    'These need to be IDs from the List 
table
    objSales.Data SLF_ProductId, sProductId
    'These need to be IDs from the List 
table
    objSales.Data SLF_TypeId, sTypeId
    objSales.Data SLF_Units, 100
    objSales.Data SLF_UnitPrice,2.25
    objSales.Data SLF_Amount, 225.00
    objSales.Data SLF_Probability, 65
    'These need to be IDs from the List table
    objSales.Data SLF_CompetitorId, CompetitorId
    objSales.Data SLF_SalesStage, " Confirmed order on phone, 
waiting for written order"
    'Update the contents of the record
    uniqueID = objSales.Update
    objSales.GoTo (uniqueID)
    If objSales.Error Then
        MsgBox objSales.LastError
    End If
    'Make the association between a 
contact and an activity
    objSales.AssociateWithContact sContactId
    objSales.AssociateWithGroup sGroupId
    Set objSales = Nothing
End If
Set objDatabase = Nothing