When I use LINQ with an SQL statement with long fieldnames, the query execution fails, because the SQL generated by DA LINQ truncates the field names.
Here is SQL example:
select
"D19" as "ImportanceGettingHelpWithCrimeProblemsRate",
"B27" as "ImportanceOfAdviseOfWorkingRelatedTroubleRate",
"C74" as "ImportanceOfTreatmentBecauseOfAlcoholMisuseRate"
from "Table"
where "FieldA" = :FieldA
Debug info from the FirebirdSql.Data.FirebirdClient:
SELECT
"t0"."ImportanceGettingHelpWithCrimeP", "t0"."ImportanceOfAdviseOfWorkingRela",
"t0"."ImportanceOfTreatmentBecauseOfA"
FROM (select
"D19" as "ImportanceGettingHelpWithCrimeProblemsRate",
"B27" as "ImportanceOfAdviseOfWorkingRelatedTroubleRate",
"C74" as "ImportanceOfTreatmentBecauseOfAlcoholMisuseRate"
from "Table"
where "FieldA" = @FieldA) "t0"
Here is how it is used in code:
var someThing, someThingElse: String;
var tbl := self.LinqDataAdapter.GetTable<Table>([new DataParameter('FieldA',2)]).ToList;
try
var rec := tbl.First;
someThing := rec.FieldSomeThing;
someThingElse := rec.FieldSomeThingElse;
except
someThing := '';
someThingElse := '';
end;
Is it not possible to have such long field names in LINQ?
Trying to avoid having to rewrite SQL code from Delphi project.