|Subject||RE: [firebird-support] Checking Ods version (2.5 <-> 3.0)|
I missed to say that it’s all about embedded usage. So before executing any statement I would need to know what firebird library to use for connecting.
My use case is actually detecting pre ODS 12 databases and doing a backup/restore to get them into the current format.
i do not know what do you mean “to check”
Can you connect to db? or you cannot and need to check?
If you can connect, then this is simple:
SELECT r.MON$ODS_MAJOR, r.MON$ODS_MINOR
FROM MON$DATABASE r
is there an easy/official way to check the ODS versions?
I was going the gstat route but the 2.5 gstat doesn't know anything about ODS 12 and up and the 3.0 gstat only knows about ODS 12 and up.
Both gstats throw errors in case of an unknown ODS Version but it feels wrong relying on that error message for distinction.