Book a Demo

Recent Posts

Pages: 1 ... 8 9 [10]
91
If you update the database, your object in memory don't know about that.
So if you have an attribute object in memory, and you call Update() it will save itself to the database, thereby overwriting the object_ID again.
So after doing a direct database updaate, you should consider your object in memory to be invalid.

Refreshing (element.Attributes.Refresh) reloads the attributes from the database.

Geert

92
curious...if I do actually use the rep.execute method, should I still run a refresh on the old and new class? I am checking the data in the actual underlying tables, and actually don't see anything that would actually need refreshing.

UPDATE...I ran a test, and debugged. My actual hardcoded update statement did work, and then ran an update(),  and the Object_ID for the row in t_attribute flipped back to the original class.

Weird, or am I not getting it?

E
93
good to know...I will see if that is possible.

Thanks
94
General Board / Re: Access sql queries from script
« Last post by amacara1 on March 27, 2026, 03:10:40 am »
Thank you. indeed, is a no go :(
95
General Board / Re: Access sql queries from script
« Last 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
96
General Board / Re: Access sql queries from script
« Last 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?
97
Thanks...I was afraid of that.

Unfortunately, I do not have update rights in the actual DB itself, so don't think I could run an update SQL statement, I believe.

Thanks for the quick answers.

Eric
Repository.Execute uses the connection EA makes to the database.
If the user that EA uses has update rights it will work.

Geert
98
General Board / Re: Access sql queries from script
« Last 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
99
General Board / Access sql queries from script
« Last 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?
100
Thanks...I was afraid of that.

Unfortunately, I do not have update rights in the actual DB itself, so don't think I could run an update SQL statement, I believe.

Thanks for the quick answers.

Eric
Pages: 1 ... 8 9 [10]