1
Automation Interface, Add-Ins and Tools / Re: Last Modification Date
« on: August 24, 2011, 09:55:54 am »
Simon,
I don't understand why would the following query cause any inconsistencies:
I'm running SQL Server 2008. Executing the query through MS SQL Server Management Studio returns a legitimate result.
At the same time running this query:
returns a valid result for models stored in SQL Database, but NOT for models stored in EAP file. It's probably much slower than using MAX, but I guess I can leave with that. Sigh...
With some try-catch magic I managed to get this to work across all models (stored in EAP and Database) but it's not pretty. If somebody has a better solution, please share it.
Thanks Geert and Simon for your hints.
Marek
UPDATE:
Oh, and I forgot, I still would love to be able to get the time, not only the date. Anybody? 8-)
I don't understand why would the following query cause any inconsistencies:
Quote
select MAX(d.modifiedDate) from t_diagram d
I'm running SQL Server 2008. Executing the query through MS SQL Server Management Studio returns a legitimate result.
At the same time running this query:
Quote
select TOP(1) ModifiedDate from t_object order by modifiedDate desc
returns a valid result for models stored in SQL Database, but NOT for models stored in EAP file. It's probably much slower than using MAX, but I guess I can leave with that. Sigh...

With some try-catch magic I managed to get this to work across all models (stored in EAP and Database) but it's not pretty. If somebody has a better solution, please share it.
Thanks Geert and Simon for your hints.
Marek
UPDATE:
Oh, and I forgot, I still would love to be able to get the time, not only the date. Anybody? 8-)