This example attempts to set the value of a property. If the property doesn't exist, a new Property object is created. Then the database object's Properties collection is enumerated.
See How to Build the DAO Method Samples.
On the MSDN Library discIf you have installed the DAO SDK, see Samples\dbdaoInstallDirectory\DAOSDK\SAMPLES\CreateProperty.cpp.