Columns showing up blank in DBGrid - Help!!
Hi,
This is a very strange bug.. I am dynamically selecting a set
of columns from the database and passing to a TQuery component
which is connected to a TDBGrid component. I am joining two
tables, both tables have 2 columns that are identical which I
need to show from the primary table, therefore my query is as
follows:
select a.ROWID, USER_ID, FLAG_ACRONYM, a.UPDATED_DATE,
a.UPDATED_BY from MCP a, DATA b where a.FLAG_NO = b._FLAG_NO
here, USER_ID belongs to table 'MCP', and FLAG_ACRONYM belongs
to table 'DATA', I am basically trying to translate 'FLAG_NO'
into it's acronym (FLAG_NO is in both tables), only table 'DATA'
contains the acronym's. and here ROWID, UPDATED_DATE, UPDATED_BY
fields are all present in both tables. When the grid shows up
USER_ID and FLAG_ACRONYM columns show up correctly, but the
columns with an 'a.', such as a.ROWID, and a.UPDATED_DATE,
a.UPDATED_BY all show up as blank.. however, if I run my
program in debug mode to evaluate the actually values, they are
all there:
qDisplay->FieldbyName("a.UPDATED_DATE")->AsString();
returns correct values, they are just not showing up in the grid.
Has anybody seen this problem? and any ideas how to get around
it? I don't know what is the cause of the problem, since the
query works fine (shows valid values) both in SQLPlus and the
Database Explorer..
Any insight is appreciated.. Thanks so much..!
Jerri