field can not be found in virtualtable
Posted: Tue 27 Jan 2015 13:17
I have a ODBC connection which has fields build as tablename>.<fieldname>.
Assign the query is not a problem, but the property indexfields doesn't know whet to do.
This is my query (with adoconnection and ODBC)
This is the code I use
I'm running MyDAC 8.13.x on Delphi 2009 pro
Assign the query is not a problem, but the property indexfields doesn't know whet to do.
If I remove the DEBOPENPST, CDDEBITEUR can not be found.Project *.exe raised exception class Exception with message 'Field DEBOPENPST.CDDEBITEUR not found'.
This is my query (with adoconnection and ODBC)
Code: Select all
SELECT DEBOPENPST.BOEKJAAR, DEBOPENPST.CDDEBITEUR,
DEBOPENPST.FACTNUMMER, DEBOPENPST.FACTSALDO,
DEBOPENPST.FACTSALDOVAL, DEBOPENPST.OPENSTAAND,
DEBOPENPST.CDDAGBOEK, DEBOPENPST.PERIODE,
DEBOPENPST.FACTDATUM, DEBOPENPST.VERVALDATUM1,
DEBOPENPST.VERVALDATUM2, DEBOPENPST.CDVALUTA,
DEBOPENPST.CDBETCOND, DEBOPENPST.CDBTW,
DEBOPENPST.CDAANMANEN, DEBOPENPST.AANGEMAAND,
DEBOPENPST.FACTBEDRAG, DEBOPENPST.FACTBEDRAGVAL,
DEBOPENPST.REFERENTIE, DEBOPENPST.KVC,
DEBOPENPST.BETKENMERK, DEBOPENPST.CDVERT,
DEBOPENPST.TRANSACTIE
FROM SYSADM.DEBOPENPST DEBOPENPST
WHERE DEBOPENPST.BOEKJAAR = :boekjaar
ORDER BY DEBOPENPST.CDDEBITEUR, DEBOPENPST.FACTNUMMER
Code: Select all
QDebopenpst.active := true;
CDSDebopenpst.assign(QDebopenpst);
QDebopenpst.active := false;
CDSDebopenpst.IndexFieldNames := 'DEBOPENPST.CDDEBITEUR';