HomeActive Query BuilderNo Object in Add Oject Form Version 1.9.0.18

No Object in Add Oject Form Version 1.9.0.18


Hello, my version is 1.9.0.18

1. I have no Objects in "Add-Ojects Form" even when I click on combo box All. In tree view I have my object ???

2 I add tables from Tree-View and he always add DB.dbo.Table but when I enter Table name in SQL string without DB.dbo he accept this, and suppress db.dbo also on shema. Can I set a Parameter to always only add Table Names with out DB.dbo ???
Manfred Heinzius | email
April 18 2008, 12:28 PM
Dear Manfred,

Let me explain the situation in detail.

Active Query Builder has an internal metadata storage (Metadata Container). During the metadata retrieval process, it requests from a database server the list of database objects. Also it queries server for the database name we are currently connected to (Default Database), and retrieves the list of schema names the user can omit when writing a query (Default Schemes).

For example, if Active Query Builder loads the Northwind database from Ms SQL Server, it stores "Northwind" as default database name, and "dbo" as default schema.
When user type a query using the table "Orders" (without any prefixes), the Metadata Container searches such table in a list of database objects. Having the Default Database and Default Schemes, it can "understand" what the "Orders" table is actually the "Northwind.dbo.Orders". If the DefaultDatabase or the DefaultSchemes properties was not filled for some reasons, Active Query Builder cannot determine that "Orders" is actually "northwind.dbo.Orders", so it forwards a query to the server to retrieve a fields list for this object, and displays this list at the query building area.

Actually, this is a fail-safe way. In ideal world, all metadata requests must be served by the Metadata Container, without a client-server roundtrip. But in our case, Active Query Builder will process tables "Orders" and "Northwind.dbo.Orders" as different tables.

Please check the following properties are properly filled: QueryBuilder.MetadataContainer.DefaultDatabase and QueryBuilder.MetadataContainer.DefaultSchemas. When these properties are filled properly, you can instruct the Query Builder to skip optional prefixes in the SQL it produces. Use the property QueryBuilder.ObjectrefixSkipping to control this behavior. There are 3 possible values for this property: opsSkipAll (default) - skip all optional prefixes, opsSkipDatabase - skip only default database, but print all schemas, and opsSkipNone - skip nothing.

Sincerely
Sergey Smagin
Sergey Smagin | email
3 days, 18 hours since original post
Dear Sergey

1. I tryed to verify QueryBuilder.MetadataContainer.DefaultDatabase and QueryBuilder.MetadataContainer.DefaultSchemas after .Connect and .RefreshMetadata but I got "Run-time error 438 Object doesn't support this property or methode".
My Version 1.9.0.20 Activx with VB6. But the property .ObjectrefixSkipping works fine thanks.

2. But what about my second Question, I still have no objects in the "ADD new object form" and in treeview I have all my objects.
Manfred Heinzius | email
4 days, 14 hours since original post
This topic is closed