Informix Error -945: Invalid parameter given to dbinfo(version).
Cause and resolution
Invalid parameter given to dbinfo(version).
You entered a value for a version that this command does not support. The arguments to dbinfo() are invalid or NULL. The first argument was the string constant version.
Check that the second argument is also a quoted string constant that corresponds to one of the following values: 'major', 'minor', 'level', 'os', 'server-type', or 'full'.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-945 fires when DBINFO('version', ...)'s second argument isn't one of the values this call
supports — per the official guidance, the second argument must be a quoted string matching one
of 'major', 'minor', 'level', 'os', 'server-type', or 'full'.
- The second argument misspelled or not matching any of the six documented values, per the official guidance.
- The second argument NULL, per the official guidance's general framing — a variable never assigned, for instance.
- The second argument not a quoted string constant at all (a variable, per -726's related
general rule for
DBINFO()'s first argument, applied here to the second).
Solutions / Resolution
- Check that the second argument is a quoted string constant matching one of
'major','minor','level','os','server-type', or'full', per the official guidance.
Examples
The disallowed attempt
SELECT DBINFO('version', 'release') FROM systables WHERE tabid = 1;
-- -945: 'release' isn't one of the six documented values
Corrected
SELECT DBINFO('version', 'full') FROM systables WHERE tabid = 1;
Diagnostic Checks
- Compare the second argument, character for character, against the six documented values.
Related Errors / Related Topics
- -726 — "First argument to dbinfo() must be a quoted string constant." A related
DBINFO()argument-validation error, on the first argument's own type/quoting. - -727 — "Invalid or NULL tblspace number given to dbinfo(dbspace)." A related
DBINFO()error, for the'dbspace'call's second argument specifically. - -728 — "Unknown first argument of dbinfo(argument)." A related
DBINFO()error, about the first argument not matching any recognized value at all.
Compare the second argument to DBINFO('version', ...) against the six documented values:
'major', 'minor', 'level', 'os', 'server-type', 'full'.