![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 2 of 2 total |
![]() |
Sat, Jun 1 2013 3:58 PM | Permanent Link |
NicoSteyn | Hi,
I am evaluating WEB and have come accross a problem that I have spent a full day on. My load results are correct when I load with a single load parameter, but when I add a second LIKE parameter it returns non-matching records also. This is where I am: I have a Dataset: Customers defined in the IDE Dataset Manager Defined as Query: SELECT * FROM Customers WHERE COMPANYID = {COMPANYID='DefaultValue'} I have the Customers1 TDataSet on my Form. I also have TEdit: edSearch on my form and TButton: btnSearch Customers1.Params.Clear; Customers1.Params.Add('COMPANYID=''' + COMPANYID +''''); Database.Load(Customers1); *** This returns the correct records *** Here is my problem: Customers1.Params.Clear; Customers1.Params.Add('COMPANYID=''' + COMPANYID +''''); Customers1.Params.Add('NAME = ''' + Trim(edSearch.Text)+'%'+''''); Database.Load(Customers1); This returns the same results as the first, including records that do not match my request. I have tried the following when defining my query in the Dataset Manager: SELECT * FROM CUSTOMERS WHERE COMPANYID = {COMPANYID='DefaultValue'} AND NAME = {NAME='DefaultValue'} and various other combinations. I have also tried the following as the second parameter: Customers1.Params.Add('NAME LIKE ''' + Trim(edSearch.Text)+'%'+''''); I would appreciate any assistance here. |
Sat, Jun 1 2013 4:13 PM | Permanent Link |
NicoSteyn | I managed to resolve, the issue was as follows:
I defined my Dataset in the Dataset Manager as: SELECT * FROM CUSTOMERS WHERE COMPANYID = {COMPANYID='DefaultValue'} AND NAME LIKE {NAME = 'NameValue'} Thanks! |
This web page was last updated on Thursday, March 23, 2023 at 02:07 AM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |