In an earlier prototype of my app when I was just displaying the data in a DBGrid everything worked fine in both the 32 & 64 bit compiled versions.
Now that I'm adding extra data handling I'm having problems - but only in 64bit mode.
When running in 64bit trying to get the contents of some of the fields by name
i.e. n_ID := head_q.FieldByName('Cont_ID').Value;
(where head_q is a TLiteQuery object)
produces the error
ProjectTest1.exe raised exception EDatabaseError with message 'LiteQuery1: Field 'Cont_ID' not found'.
What's puzzling is that in 64 bit some fields get the error and others don't, yet all fields show in the DBGrid. When compiled as a 32bit exe everything works fine.
Code: Select all
var
n_ID : Integer;
begin
n_ID := head_q.FieldByName('Vendor_ID').Value; //this works - Integer field
n_ID := head_q.FieldByName('Cont_ID').Value; //<<produces error in 64 bit!