Menu

#2 Error getting oracle version on oracle 11g

v1.20
open
nobody
5
2013-08-28
2013-08-28
No

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:

Index: OraUtils.pas

--- 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));

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.