SetReference(keyField, valueField)
Sets a reference table for this object. The keyField field is the key of the reference table. The valueField field is the value of the reference table. This object must belong to the Query::Fields collection and must not be the calculated field. There must not be calculated fields built on this field for GDB queries. It is not allowed to set the reference table for fields of type gdbFieldTypeOLEObject. The type of this object must correspond with the type of the key field. The key field and the value field must belong to the same table from GDB or external database (to the same Table::Fields collection). The key field must be unique (to have the gdbFieldAttrUnique attribute) for GDB queries.