UniMetadata - get table and View list
Posted: Mon 02 Feb 2015 02:37
I am trying to get a table and view list from either a Firebird or a MS SQL database.
That is basically the code. The CONNECTION is either to a Firebird 2.5 database, or to a MS SQL database.
Problem 1 -
In Firebird, I get the correct list of tables. I want to separate out the list of Views. Is there any way to do this??
Problem 2 -
In MS SQL, I get a list of everything - not limited to tables. All system tables, columns, contraints, views, everything.
How Can I just see the tables. Also - want to separate out the Views. Any way to do this?
Code: Select all
MetaData.MetaDatakind := 'Tables';
MetaData.open;
MetaData.first;
while not MetaData.eof do
begin
temp := MetaData.FieldByName('TABLE_NAME').AsString;
if Pos('RDB$', temp) = 0 then
AddNode(TablesNode, temp, cTableImage) ;
MetaData.next;
end;
MetaData.close;
Problem 1 -
In Firebird, I get the correct list of tables. I want to separate out the list of Views. Is there any way to do this??
Problem 2 -
In MS SQL, I get a list of everything - not limited to tables. All system tables, columns, contraints, views, everything.
How Can I just see the tables. Also - want to separate out the Views. Any way to do this?