Hi,
I applied the following SQL statement that return “field not found”. How to solve it? I need to use same field to handle DBLookupCombo because it has multiple language description.
SELECT SDC_guid, SDC_code, SDC_CHSDesc AS DeptDesc FROM SampleDepartment
EvgenyK
(Evgeny Karpov)
June 18, 2022, 7:17pm
2
Hi,
Can you show declaration of SampleDepartment
in schema modeller, pls?
EvgenyK
(Evgeny Karpov)
June 20, 2022, 9:55am
5
Hi,
I can reproduce that AS
keyword doesn’t work as expected
EvgenyK
(Evgeny Karpov)
June 20, 2022, 10:31am
6
Hi,
update uDASQLQueryProcessor.pas
as
procedure TQueryProcessor.VisitSelect(action: TSelectAction);
...
list.Add(s);
action.ResultTable.Fields[i].SQLOrigin :=s;
action.ResultTable.Fields[i].Name := s; // <<<<< added
bugs://D19266 was closed as fixed.
Hi,
I added your suggestion and recompile all files (includes my application). But it also can’t show the correct field name.
EvgenyK
(Evgeny Karpov)
June 20, 2022, 12:10pm
9
Hi,
odd. it works on my side:
can you create a simple testcase, pls?
you can drop email to support@ for keeping privacy
Hi,
I’m not doing in Schema Modeler. It is using in client side.
DASQL3 := ‘SELECT SDC_guid, SDC_code, SDC_CHSDesc AS DeptDesc FROM SampleDepartment’;
ClientDataModule.RemoteDataAdapter.FillWithDASql([SMPDept], [DASQL3], [nil]);
EvgenyK
(Evgeny Karpov)
June 20, 2022, 12:37pm
11
Hi,
the issue was that sql like SELECT SDC_guid, SDC_code, SDC_CHSDesc AS DeptDesc FROM SampleDepartment
returned 3 fields :
SDC_guid
SDC_code
SDC_CHSDesc
instead of DeptDesc
now it should return DeptDesc
as 3rd field.
Have you caught another issue? in DA SQL itself?
Hi,
I got the different result with you.
EvgenyK
(Evgeny Karpov)
June 20, 2022, 12:42pm
13
Hi,
try to close Delphi IDE and launch C:\Program Files (x86)\RemObjects Software\Build\install_DA.cmd
with admin rights.
it should rebuild .dcu, .dcp and .bpl
Hi,
I tried your suggestion and then rebuild all DA and client. The result is the same that can’t show the correct field name.
Hi,
I created the simple testcase by email. Please check it.
EvgenyK
(Evgeny Karpov)
June 20, 2022, 2:41pm
16
Hi,
you can update field’s DisplayLabel
too as
procedure TQueryProcessor.VisitSelect(action: TSelectAction);
...
list.Add(s);
action.ResultTable.Fields[i].SQLOrigin :=s;
if action.ResultTable.Fields[i].DisplayLabel = action.ResultTable.Fields[i].Name then // added
action.ResultTable.Fields[i].DisplayLabel := s; //added
action.ResultTable.Fields[i].Name := s; //added
Hi,
I tested it works fine. Thanks a lot. Does it include in next version?