Argument out of range

Hi,

I want to handle multi-language description. So I use the following code in client side and create 2 calucate fields in server side.
ROerror

if (SYS_Language = ‘ENG’) then
begin
MasterLang := 'c.MST_EngDesc as MRKDesc, d.MST_EngDesc as CUTDesc ';
end;
if (SYS_Language = ‘CHS’) or (SYS_Language = ‘CHT’) then
begin
MasterLang := 'c.MST_CHSDesc as MRKDesc, d.MST_CHSDesc as CUTDesc ';
end;
if (SYS_Language = ‘CAM’) then
begin
MasterLang := 'c.MST_KHRDesc as MRKDesc, d.MST_KHRDesc as CUTDesc ';
end;

DASQL1 := 'select a.*, ’ + Masterlang + ’ FROM SampleInfo a inner join SampleHrd b on b.SPH_guid = a.SPH_guid and b.SPH_Status <> ’ + QuotedStr(‘D’) +
’ left join MasterProfile c on c.MST_guid = a.SPI_Marker and c.MST_Status <> ’ + QuotedStr(‘D’) +
’ left join MasterProfile d on d.MST_guid = a.SPI_Marker and d.MST_Status <> ’ + QuotedStr(‘D’) +
’ where a.SPI_Status <> ’ + QuotedStr(‘D’);
ClientDataModule.RemoteDataAdapter.FillWithDASql([SampleInfo], [DASQL1], [nil]);

How to solve the error? Or any advise to handle multi-language description? My environment is Delphi 11.2.

Hi,

can you create a simple testcase that reproduces this case, pls?
you can drop it to support@ for keeping privacy