Re: detecting 4.0, 4.1, 5.0 SEs from 4gl 4.0, 4.1
Posted in 1993
>From: uunet!serss0!iq8j9m01 (Roderick Schertler)
>Subject: detecting 4.0, 4.1, 5.0 SEs from 4gl 4.0, 4.1
>Date: Mon, 22 Mar 1993 04:49:49 GMT
>X-Informix-List-Id: <news.2870>
>Anybody have a good way to differentiate various engines from 4gl?
>Particularly, I need to tell between 5.0, 4.1 and 4.0 SEs from 4gl 4.1
>and 4.0. I'm figuring the trick is to prepare a "set optimization to
>..." and execute it between whenever errors, but I'd appreciate tips on
>specific statements to use to tell between those engines (or a more
>general solution). Also like to know if I'm off base -- if I've missed
>sql_version() in the manuals or somesuch... Thanks.
How about:
SELECT owner FROM informix.systables WHERE tabname = " VERSION";
On pre-4.00 engines, this won't prepare (because the owner.table notation
is not understood), which is a dead giveaway that your on a really old
engine. In any case, those versions would not have returned any row (so if
you remove the "informix." from the statement, it will work OK, but simply
won't return any data. On later engines (meaning 4.00 and above), you get
back the version number, so I got back 5.01 from a 5.01.UC1A2 OnLine
engine.
I don't know whether this is officially supported or not, but it seems to
work with both SE and OnLine.
Yours,
Jonathan Leffler (johnl@obelix.informix.com) #include <disclaimer.h>