Subject | RE: [IBO] Getting list of table names |
---|---|
Author | John Tomaselli |
Post date | 2000-12-01T16:10:32Z |
from the demos ibobjects for rbuilder
{ TdaIBOSession.GetTableNames }
procedure TdaIBOSession.GetTableNames(const aDatabaseName: String; aList:
TStrings);
var
lDatabase: TIB_Connection;
begin
{get the database}
lDatabase := daGetIBODatabaseForName(aDatabaseName);
{connection must be active to get table names}
if not lDatabase.Connected then
lDatabase.Connected := True;
if lDatabase.Connected then begin
alist.Assign(lDatabase.SchemaCache.TableNames);
alist.AddStrings( lDatabase.SchemaCache.ViewNames ); //added by greater
than zero for views
end;
end; {procedure, GetTableNames}
John
-----Original Message-----
From: Brian Dunstan [mailto:bdunstan@...]
Sent: Friday, December 01, 2000 7:56 AM
To: 'IBObjects@egroups.com'
Subject: RE: [IBO] Getting list of table names
James,
select rdb$relation_name from rdb$relations where rdb$relation_name not
starting 'RDB$';
I don't know how to do it without going to the database, unless you do
something with schema cache maybe.
HTH,
Brian
{ TdaIBOSession.GetTableNames }
procedure TdaIBOSession.GetTableNames(const aDatabaseName: String; aList:
TStrings);
var
lDatabase: TIB_Connection;
begin
{get the database}
lDatabase := daGetIBODatabaseForName(aDatabaseName);
{connection must be active to get table names}
if not lDatabase.Connected then
lDatabase.Connected := True;
if lDatabase.Connected then begin
alist.Assign(lDatabase.SchemaCache.TableNames);
alist.AddStrings( lDatabase.SchemaCache.ViewNames ); //added by greater
than zero for views
end;
end; {procedure, GetTableNames}
John
-----Original Message-----
From: Brian Dunstan [mailto:bdunstan@...]
Sent: Friday, December 01, 2000 7:56 AM
To: 'IBObjects@egroups.com'
Subject: RE: [IBO] Getting list of table names
James,
select rdb$relation_name from rdb$relations where rdb$relation_name not
starting 'RDB$';
I don't know how to do it without going to the database, unless you do
something with schema cache maybe.
HTH,
Brian
> -----Original Message-----
> From: James Bunting [mailto:jpb@...]
> Sent: Friday, 1 December 2000 8:43 PM
> To: IBObjects@egroups.com
> Subject: [IBO] Getting list of table names
>
>
> Hi,
>
> Can someone please tell me how to get a list of table names,
> preferably without querying the system database?
>
> TIA
>
>
> James Bunting
>
> Systematic Marketing Ltd
> http://www.systematicmarketing.com
> http://www.ukindex.co.uk
>
> -------------------------- eGroups Sponsor
> -------------------------~-~>
> eLerts
> It's Easy. It's Fun. Best of All, it's Free!
> http://click.egroups.com/1/9699/1/_/685810/_/975674573/
> --------------------------------------------------------------
> -------_->
>
>
>