Number of metadata filter limits ?

Answered

Comments

15 comments

  • Official comment
    Avatar
    Sergey Smagin (Product manager)

    Hello,

    There is no limit on the number of metadata filter items; you can add as many items as you wish. But if you have a list of objects to show, it might be a good idea to load metadata from the pre-generated XML file. You can download the Metadata editor tool from the download page. Using it, you can load metadata from your database, remove unwanted objects and then save this information to the XML file. You can load it using the MetadataContainer.LoadFromXMLFile method or you can save the content of this file in resource and load as a string using the MetadataContainer.LoadFromXML method.

    Comment actions Permalink
  • Avatar
    Minieggs

    I've downloaded the Metadata editor and had a go at doing this and have found some bugs

    Although the Metadata editor produces valid XML the field elements are sometimes <field> and other times <Field>

    When LoadFromXML reads this information it looks like it is expecting <field> because all of the <Field> elements are missing

    The second problem is that the SQL created from tables loaded using the 'online' database produced a statement like

    Select qvwMoney.Finance_Period, qvwMoney.Donation_Amount .......

    Where as if it is loaded from the XML it produces

    Select [Mydatabase].dbo.qvwMoney.Finance_Period, [Mydatabase].dbo.qvwMoney.Donation_Amount ....

    Whilst both are obviously valid it meas I cannot simply save the SQL string from one method and load it into the other even though they are both for the same database

    Thanks

    0
    Comment actions Permalink
  • Avatar
    Minieggs

    Actually the first problem might be the Dataflex studio editor seeing field as a key word and sometimes making it Field

    0
    Comment actions Permalink
  • Avatar
    Sergey Smagin (Product manager)

    Well, if the first problem does not relate to our software, then the answer is needed only for the second one...

    To solve the second problem please specify the "defaut_database" element inside the "metadata" element in XML file by handand set it's value to "Mydatabase". Also you can set it programmatically using the ActiveQueryBuilderX.MetadataContainer.DefaultDatabase property.

    0
    Comment actions Permalink
  • Avatar
    Minieggs

    Setting the default_database like this under default schema does not seem to have an effect ?

    <?xml version="1.0" encoding="UTF-8"?>

    <default_schemas>
    <item name="dbo" case_sens="0" />
    </default_schemas>
    <defaut_database>
    <item name="Mydatabase" case_sens="0" />
    </defaut_database>
    <view>
    <database>
    <item name="Mydatabase" case_sens="0" />
    </database>
    <schema name="dbo" case_sens="0" />

    ....

    0
    Comment actions Permalink
  • Avatar
    Minieggs

    TYPO !!!!

    0
    Comment actions Permalink
  • Avatar
    Sergey Smagin (Product manager)

    Sorry, my mistake. There's a typo in my message. Please correct "defaut_database" to "default_database".

    0
    Comment actions Permalink
  • Avatar
    Minieggs

    Thanks, I thought it was me :)

    I'm still not quite there in terms of I still cannot set the LayoutSQL from 'online' version to a version that has been loaded from the XML

    Still digging

    0
    Comment actions Permalink
  • Avatar
    Sergey Smagin (Product manager)

    Setting or getting the LayoutSQL property has no connection with operations perfomed with the Metadata Container...

    0
    Comment actions Permalink
  • Avatar
    Minieggs

    OK the specific problem with this particular query seems to be a difference in one field in online/offline modes that is returneed in the string from LayoutSQL

    ONLINE
    qvwMoney.Source

    OFFLINE
    qvwMoney.[Source]

    Interestingly a field called qvwMoney.[Group] is [] in both cases

    If I add/remove the [] in the debugger then I can load SQL created in one into the other

    0
    Comment actions Permalink
  • Avatar
    ActiveDBSoft support team

    Seems you should ensure you set same SQLSyntax in both AQB instances

    0
    Comment actions Permalink
  • Avatar
    Minieggs

    I currently don't set it in code so it should be xsAuto as per your comment in the ActiveX code

    // For the ActiveX Edition, use the "SQLSyntax = xsAuto" setting and examine the UsedSQLSyntax property.

    So I guess I need to work out what it is after connection and somehow put that in the XML ?

    0
    Comment actions Permalink
  • Avatar
    Minieggs

    It seems the SQLSyntax is Auto before AND after Connected is set to true

    I don't seem to have a UsedSQLSyntax property ?

    Thanks

    0
    Comment actions Permalink
  • Avatar
    ActiveDBSoft support team
    UsedSQLSyntax is a read-only property of the IActiveQueryBuilderX

    Could you set up some syntax forcely? For example, SQL92 or Universal?

    0
    Comment actions Permalink
  • Avatar
    Minieggs

    OK I have now set it to xsMSSQL2008 BEFORE loading the XML or setting connected to True and this seems to have helped

    0
    Comment actions Permalink

Please sign in to leave a comment.