Products

Home Forums eaDocX queries SQL script does not work in EaDocX Element Report

Home Forums eaDocX queries SQL script does not work in EaDocX Element Report

Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • #8419
    eadocX Support
    Participant

    …and as soon as I can clone myself it will!

    #8420
    eadocX Support
    Participant

    Some tiny steps forward with this….
    It seems that the SQL which EA is happy to run via the Model Search mechanism does not always run successfully when used via the Repository.SQLSearch API. I don’t this has changed from v12 to V13 of EA, or across eaDocX versions (since this feature was introduced way back..)

    For example:
    EA Model Search is happy with:
    select t_object.Name as ‘The NAME’
    from t_object where t_object.Stereotype = ‘1’

    But when submitted via Repository.SQLSearch, it throws an error – the one you are seeing.

    It seems that the ‘AS’ clause needs to be followed by a simple string, with no quotes.
    So this seems to be acceptable to both:

    select t_object.Name as The_Name
    from t_object where t_object.Stereotype = ‘1’

    I think this is the root of your troubles.
    I recall a conversation with one of the Sparx development team to the effect that SQL which is submitted via Repository.SQLSearch has all kinds of strange things done to it before it’s really sent to the database: mapping of element types using MDGs for example. So I’m guessing that something is going wrong in here somewhere.

    I can confirm that the use of SQl Searches to populate eaDocX Element Reports DOES work – it’s just that the Sparx API is sensitive to the structure of that SQL.

Viewing 2 posts - 16 through 17 (of 17 total)
  • You must be logged in to reply to this topic.

Compare licence prices

Choose the licence that’s right for you and your team

Prices

Download a free trial

Download eaTeamWorks today for several free for life features, plus no obligation, 30-day trials of all the products: eaDocX, ea Revision Manager, eaSheets, Model Expert and PortfolioManager. Discover for yourself why we sell the world’s best-selling Enterprise Architect extension.

Download