On Tue, Mar 18, 2008 at 5:50 PM, Olivier Mascia <om@...> wrote:
> If this is for a fully dynamic context, where your compiled code does
> not know at compile time the structure of the tables it reads, you
> *have* to use the Firebird system tables, to discover the exact
> declarative structure, complete with all details. The C API, which
> IBPP is built on, does NOT offer the full details anyway.
> Querying those system tables for information is done through ordinary
> SQL queries against the RDB$... tables
That is easy for tables, but not when you have custom select
statments, which can involve casts, stored procedures, derived
(aggregate and such) columns, etc. Not to mention CTEs and derived
tables. I'm not sure what are David's needs, but if he cannot prepare
the statement before creating dataset, it's not going to be very easy.
> This is the bulk of what a tool like Flamerobin does.
Actually, FR prepares the statement, and then uses ColumnType,
ColumnScale, etc. for grid display. We use system tables only for some
advanced stuff (making the grid update-able).