Hi all,
I think there's some problem in db.pas unit because when you use
aDataset.FindField(aFieldName) return a TField even if found a Lower/Upper/camelCase FieldName
because always tested in uppercase (see source)
But when you use aDataSet.FieldByName(aFieldName).AsString, this use the correct case.
So there's some problem, for example call the function
UpdateDSet(aDSet,'MyFieldName','aVal')
Example :
I use SqlLite DB with a table with this field = 'aFieldName'
This is a function to update a Dset (simplify here)
function UpdDSet(pDset : TDataSet; pFieldName, pVal : String) : Boolean;
begin
if (pFieldName <> '') then
if (pDset.FindField(pFieldName) <> nil) then
begin
pDset.FieldByName(pFieldName).AsString := pVal;
end;
end;
UpdDSet('AFIELDNAME') => this field recognize with FindField but not in pDset.FieldByName