Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: amacara1 on March 26, 2026, 11:12:18 pm

Title: Access sql queries from script
Post by: amacara1 on March 26, 2026, 11:12:18 pm
I have a number of sql queries imported in a model from an MDG. I would like to run such an sql query from a JScript. How can one find the string from stored sql queries, please?
Title: Re: Access sql queries from script
Post by: Geert Bellekens on March 27, 2026, 02:03:07 am
The query is stored in the MDG xml, which, depending on the way the MDG is deployed is stored as a file, or internally in EA.
You would need to parse the xml and get that search string.

I'm pretty sure it's going to be easier to hardcode the query in your script.

Geert
Title: Re: Access sql queries from script
Post by: amacara1 on March 27, 2026, 02:16:00 am
Thanks! I would like to avoid duplicating the query, if possible.
If it is stored internally in EA, where would I find that, please?
Title: Re: Access sql queries from script
Post by: Geert Bellekens on March 27, 2026, 02:42:30 am
Thanks! I would like to avoid duplicating the query, if possible.
If it is stored internally in EA, where would I find that, please?

IIRC the t_document table. But it's in a compressed binary format.

Geert
Title: Re: Access sql queries from script
Post by: amacara1 on March 27, 2026, 03:10:40 am
Thank you. indeed, is a no go :(