getAtKey

getAtKey(keys: KeyType): MemberType;

The getAtKey method of the ExternalDictionary class issues a singleton SQL select, which searches for an exact match between the member-key attribute values of virtual instances (rows) and the corresponding key parameters.

If a row is selected, a proxy reference representing that row is returned; otherwise this method returns null.

The following example shows the use of the getAtKey method.

listBoxEmployees_dblClick(listbox: ListBox input) updating;
vars
    emp  : Employees;
    emps : EmployeesByLastNameDict;
    cm   : CustMaintForExternalDB;
begin
    create emps;
    emp := emps.getAtKey(listBoxEmployees.text);
    create cm;
    cm.textBoxName.enabled := false;
    cm.myEmployee          := emp;
    cm.textBoxName.text    := emp.firstName & " " & emp.lastName.toUpper;
    cm.textBoxCity.text    := emp.city;
    cm.textBoxAddress.text := emp.address;
    cm.show;
epilog
    delete emps;
end;