Error getting oracle version on oracle 11g
Brought to you by:
lasersquad
Our oracle answers its version as: "11.2.0.3.0 Production"... when parsing this version, the function VerStr2Int of OraUtils.pas fails converting the version string to an integer and throws the message "'0 Production' is not a valid integer."
Follow the patch:
--- OraUtils.pas (revision 7003)
+++ OraUtils.pas (revision 7004)
@@ -56,6 +56,7 @@
then Result := Result * 100
else begin
i1 := Pos('.', s);
+ if i1 = 0 then i1 := pos(' ',s);
if i1 = 0 then i1 := Length(s) + 1;
Result := Result * 100 + StrToInt(Trim(Copy(s, 1, i1 - 1)));
s := Copy(s, i1 + 1, Length(s));