Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 2 of 2 total |
Find is not finding the record |
Mon, Jul 8 2019 11:07 PM | Permanent Link |
KimHJ Comca Systems, Inc | This is driving me crazy for hours I can not get Find to work. I have used it before many times, but always with Strings.
Using the latest version of EWB and EDB I have a table with Employee. The first column is EmployeeID integer. The Constraint is set to this field and there is no other Indexes. This is the query in the Dataset dropped on the Database form. Select * from employee where EmployeeID={EmployeeID=1} Base table is employee. There is two records in the table with EmployeeID 100 and 101 Here is my code to find the employee, the DataSet's name is FindEmp. .if FindEmployee(StrToInt(EmpIdEd.Text)) then begin Label.Caption := FindEmp.Columns['EmpName'].AsString; FindEmp.Close; end; function TDatabase1.FindEmployee(EmpID: Integer): Boolean; begin with FindEmp do begin Open; try InitFind; Columns['EmployeeID'].AsInteger:=EmpID; if Find(False,False) then Result:=True else Result:=False; finally end; end; It always return False. Thanks for any help. Kim |
Mon, Jul 8 2019 11:55 PM | Permanent Link |
KimHJ Comca Systems, Inc | I found that if I drop the employee table without a query and do a LoadRows(Employee) before using Find it works, so there must be something I'm missing in the Query DataSet.
Kim |
This web page was last updated on Wednesday, October 9, 2024 at 05:37 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |