Subject Detecting server version at application startup
Author cprund
I'd like to detect Firebird Server version (not client) version at
startup, immediately after I open the database.

I need to do this because my application requires Firebird 1.5 but
Interbase 6 would happily open my database.

Unfortunately people make mistakes and often enough my application
ends up being paired with an Interbase 6 server! This generates some
un-helpful error messages, like "unknown BLR". I'd like to detect
this and put out a message.

So I'm thinking of something like this. First query on application

"select current_user from rdb$database"

If this fails it's Interbase 6. Stop there.

But how can I test for Interbase 1.5 using such harmless queryes?

Better, is there any way to see the difference betwen 1.5.3 and
1.5.4, so I can recomend an server upgrade?

Cosmin Prund