HomeActive Query BuilderHow can I show only the schema which I'm connecting with and hide the rest

How can I show only the schema which I'm connecting with and hide the rest


Hi,

I'm using the Active query builder with Oracle schema,

When I try to open the tree of schemas, I found the schema which I'm connecting with with other schemas like DMSYS, OLAPSYS and other

How can I hide the rest and keep only my schema ?

Thanks in advance
Homam | email
October 18 2010, 08:00 AM
Dear Homam,

You should place the following code before the RefreshMetadata call:

MetadataFilterItem mfi = queryBuilder1.MetadataFilter.Add();
mfi.Exclude = false;
mfi.SchemaMask = "schema";

You may learn more about metadata filtration here: http://www.activedbsoft.com/helpdesk/index.php?pg=kb.page&id=6
Sergey Smagin | email
20 hours, 25 mins since original post
Thanks Sergey Smagin, but how can I get the schema name?
Homam | email
2 days, 3 hours since original post
It can be retrieved from the QueryBuilder.MetadataContainer.DefaultSchemaNames collection after metadata retrieval process (usually using the RefreshMetadata method). To retrieve it prior to loading metadata, you may call the SyntaxProvider.GetDefaultSchemaNames method:

SQLIdentifiersCollection collection = new SQLIdentifiersCollection(queryBuilder1.SQLContext);
queryBuilder1.SyntaxProvider.GetDefaultSchemaNames(queryBuilder1.SQLContext, collection);

String schema = collection[0].Token;
Sergey Smagin | email
1 week since original post
This topic is closed