i added overrides of LoadColumns() for firebird, sqlite, mysql. These Drivers are able to return the fieldname and it's tablename so dermining metainformations should be easy for them.
Where is the issue comming from:
Note current code ist pretty abstract and try's to find the column the by it's fieldname or better fieldlabel. While playing with the stuff i was running into several traps:
1. FireBird automatically returns unique FieldLabels. They do not fit to the determined SelectSchema.
Code: Select all
SELECT
LINGUE_PC."Arrivo",
PREVHDR."Arrivo"
FROM
PREVHDR INNER JOIN
LINGUE_PC ON (PREVHDR."Lingua" = LINGUE_PC."Codice")
returns all columnlabels as "Arrivo, Arrivo_1" in the native columninfos. Looking to your select which runs though a sectional splitted composer of zeos
zeos can't know that second column will not match to the columninfo which was retrieved by firebird is named as Arrivo_1.
using:
Code: Select all
SELECT
LINGUE_PC."Arrivo",
PREVHDR."Arrivo" as "Arrivo_1"
FROM
PREVHDR INNER JOIN
LINGUE_PC ON (PREVHDR."Lingua" = LINGUE_PC."Codice")
would resolve your issue. That's what you did with your view.
2. Trap: Column Identifiers and it's labes are handled differently by supported RDBMS.
As stated in point 1 firebirds automatically returns unique columnlabels.
All other protocols have it's own behavior as well. So some of them are returning the programmers exact given columnlabel, which doesn't match the rules of (Quoted)Identifer quoting or dequoting rules.
3. MySQL and it's table-identifiers...
Finally it has nothing todo with quoted or unquoted identifiers.
could yout test my suggestion with the unique labels?
I would like to know how all do think about? In the past Jan did build in a OIDTablecache because of same reasons i think.
Everything is possible.