Discussion:
dbExpress4 - retrieving MetaData issue
(too old to reply)
Rich Werning
2008-02-19 15:32:53 UTC
Permalink
We use an inhouse app to keep multiple databases in sync. It verifiies all
of the tables, columns, indexes and procedures. I've been maintaining and
enhancing this app for over 10 years now, from BDE in Delphi 2 to dbExpress
4 now, and I"m stumped. I can't figure out how to get the index definitions
from the new dbExpress 4 methods. I can get the indexes themselves (ie.
schema, name, table, uniqueness, etc), but I can't figure out how to
retrieve the columns that make up each index.

I know I could code my own sql using the databas system tables, but this
app supports Oracle, MsSql, Firebird, Informix and Interbase (possibly DB2
and PostgreSQL soon), so I'd rather not have to hard code each - using
dbExpress metadata makes more sense. I was able to do this in previous
versions of dbx, is the functionality now missing or am I missing something?

Thanks for your assistance
--
Rich Werning
TIP Technologies, Inc.
Rich Werning
2008-02-19 22:26:03 UTC
Permalink
Still digging my way through it, but I think that whats missing is an option
in SqlExpr. Both OpenSchema method and TSchemaType should be updated to
support an option for stIndexColumns (or similiarly named).

I'm working on grabbing the pieces I need out of there to do the work
locally, and see if that works for my needs.

- Rich
Post by Rich Werning
We use an inhouse app to keep multiple databases in sync. It verifiies
all of the tables, columns, indexes and procedures. I've been maintaining
and enhancing this app for over 10 years now, from BDE in Delphi 2 to
dbExpress 4 now, and I"m stumped. I can't figure out how to get the index
definitions from the new dbExpress 4 methods. I can get the indexes
themselves (ie. schema, name, table, uniqueness, etc), but I can't figure
out how to retrieve the columns that make up each index.
I know I could code my own sql using the databas system tables, but this
app supports Oracle, MsSql, Firebird, Informix and Interbase (possibly DB2
and PostgreSQL soon), so I'd rather not have to hard code each - using
dbExpress metadata makes more sense. I was able to do this in previous
versions of dbx, is the functionality now missing or am I missing something?
Thanks for your assistance
--
Rich Werning
TIP Technologies, Inc.
Rich Werning
2008-02-20 18:16:45 UTC
Permalink
I created QC #58518 on this issue with the changes required to implement
returning of IndexColumns in a TCustomSQLDataSet. A couple simple lines to
SqlExpr resolves the problem. It's still an issue for us because we use
runtime packages, so I'll have to jump thru some hoops to get this into our
utility. I thought I'd share in case someone else runs into this issue and
needs a fix for it.
--
Rich Werning
TIP Technologies, Inc.
Post by Rich Werning
Still digging my way through it, but I think that whats missing is an
option in SqlExpr. Both OpenSchema method and TSchemaType should be
updated to support an option for stIndexColumns (or similiarly named).
I'm working on grabbing the pieces I need out of there to do the work
locally, and see if that works for my needs.
- Rich
Post by Rich Werning
We use an inhouse app to keep multiple databases in sync. It verifiies
all of the tables, columns, indexes and procedures. I've been
maintaining and enhancing this app for over 10 years now, from BDE in
Delphi 2 to dbExpress 4 now, and I"m stumped. I can't figure out how to
get the index definitions from the new dbExpress 4 methods. I can get
the indexes themselves (ie. schema, name, table, uniqueness, etc), but I
can't figure out how to retrieve the columns that make up each index.
I know I could code my own sql using the databas system tables, but this
app supports Oracle, MsSql, Firebird, Informix and Interbase (possibly
DB2 and PostgreSQL soon), so I'd rather not have to hard code each -
using dbExpress metadata makes more sense. I was able to do this in
previous versions of dbx, is the functionality now missing or am I
missing something?
Thanks for your assistance
--
Rich Werning
TIP Technologies, Inc.
Loading...