JVCL Help:TJvDBCustomSearchComboBox.GetResult

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Summary

Retrieves field values from a record that matches the search value.


Pascal

 functionGetResult: Variant;


Description

Call GetResult to search for a record in the dataset in which the DataField field contains the value of the combo box text and return other field values from the found record.
procedure TForm1.Button1Click(Sender: TObject);
var
V: Variant;
C: Integer;
A: String;
begin
JvDBSearchComboBox.DataResult := 'CustNo;Addr1';
V := JvDBSearchComboBox.GetResult;
ifnot (VarType(V) in [varNull]) then
begin

 C := V[0];
A := V[1];
ShowMessage(IntToStr(C) + #10 + A);
end
else
ShowMessage('Search unsuccessful!'); end;


About

Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page