after DB connection attempt I obtain "EDatabaseError. SQLQueryMain: Field not found: "gain_co". Of course, this field is present at the table!I wonder if this is an error from the database or from the TFieldlist.
I don't understand why...! Especially because of the fact that the following code in one of my previous program works:
It seems to me that it is Linux Red Hat Enterprise, but I'm not sure.open a terminal window and type
the default compression may be tied to the version, but usually there is a config option for legacy.Even if the compression is specific to the OS version, it wouldn't result in an error "Field not found: "gain_co".
The reason i asked for the Server-OS: On Linux the Fieldnames are case sensitive (as contrary on Windows).That seems unlikely since OP stated the same code worked before.
In that way: Is your field really named "gain_co" or is it maybe something like "GAIN_CO"?
His "working" code has all fieldnames in UpperCase,If you look at the line add('from tst'); you'll see that it is from a (lowercase) testtable. I don't suspect that testtable is made by a SysAdmin (but made by OP himself).
and since he refers to a SysAdmin, i don't think he has any say in the Setup of the Server (nevermind the Database itself)
His "working" code has all fieldnames in UpperCase,If you look at the line add('from tst'); you'll see that it is from a (lowercase) testtable. I don't suspect that testtable is made by a SysAdmin (but made by OP himself).
and since he refers to a SysAdmin, i don't think he has any say in the Setup of the Server (nevermind the Database itself)
But let's wait for OPs answer before speculating any further.
So it can be:
*) upper/lowercase mixing (which might not be supported)
*) static gain_co in tsqlquery (which is not 'named' in the sql)
*) incompatibility with (un)compress between OSes (which I don't expect seeing the error)