Book a Demo

Author Topic: Access sql queries from script  (Read 6252 times)

amacara1

  • EA User
  • **
  • Posts: 55
  • Karma: +0/-0
    • View Profile
Access sql queries from script
« 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?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13505
  • Karma: +572/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Access sql queries from script
« Reply #1 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

amacara1

  • EA User
  • **
  • Posts: 55
  • Karma: +0/-0
    • View Profile
Re: Access sql queries from script
« Reply #2 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?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13505
  • Karma: +572/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Access sql queries from script
« Reply #3 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

amacara1

  • EA User
  • **
  • Posts: 55
  • Karma: +0/-0
    • View Profile
Re: Access sql queries from script
« Reply #4 on: March 27, 2026, 03:10:40 am »
Thank you. indeed, is a no go :(