DAO::_FieldPtr field;
fieldName = field->GetName().GetBSTR(); nType = field->GetType() // returns DAO::dbDecimal lSize = field->GetSize(); // returns 16 lAttr = field->GetAttributes(); // returns 0x000002H nOrdinal = field->GetOrdinalPosition(); // returns 11 bAutoIncrement = ((lAttr & DAO::dbAutoIncrField) > 0); DAO::PropertiesPtr props; DAO::PropertyPtr prop; int k, nProp; std::wstring propName, propNames; props = field->GetProperties(); if(props) { nProp = props->GetCount(); // returns 33 for(k = 0; k < nProp; k++) { prop = field->GetProperties()->GetItem((short) k); if(prop) { propName = prop->GetName().GetBSTR(); propNames += propName; propNames += L"\n"; } } // After exiting the loop, propNames contain 33 properties as: // Value // Attributes // CollatingOrder // Type // Name // OrdinalPosition // Size // SourceField // SourceTable // ValidateOnSet // DataUpdatable // ForeignName // DefaultValue // ValidationRule // ValidationText // Required // AllowZeroLength // AppendOnly // Expression // FieldSize // OriginalValue // VisibleValue // GUID // ColumnWidth // ColumnOrder // ColumnHidden // Description // DecimalPlaces // DisplayControl // TextAlign // AggregateType // ResultType // CurrencyLCID // But does not have any property named "Scale" or "Precision" }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)