Print Thread
AV in TOracleSession.ReturnCode
#1271 11/15/00 03:17 AM
Joined: Aug 2000
Posts: 21
Melbourne,VIC,Australia
S
Sonique Offline OP
Member
OP Offline
Member
S
Joined: Aug 2000
Posts: 21
Melbourne,VIC,Australia
Hi Marco etc.

I've just found a minor problem with the ReturnCode function. We have some code which looks (roughly)like this:

try
Session.LogOn;
except
Trace.Log('[Error Connecting]: ' +
OracleSession.ErrorMessage(OracleSession.ReturnCode));
raise;
end;

Now if the OCI dll fails to load for whatever reason, TOracleSession.ReturnCode attempts return LDA.rc, raising an AV as the LDA is invalid.

Regards,

Paul

Re: AV in TOracleSession.ReturnCode
#1272 11/16/00 03:35 PM
Joined: Sep 1999
Posts: 27
Germany
K
Member
Offline
Member
K
Joined: Sep 1999
Posts: 27
Germany
An other posibility may be:

[quote]
Code
TRY
  Session.LogOn;
EXCEPT
  ON E:EXCEPTION DO BEGIN
    Trace.Log ('[Error Connecting]: ' +
               E.Message); 
    RAISE;
    END;
END;
[/quote]

That won't raise an AV.

Oliver


Oliver Kaesmann
Re: AV in TOracleSession.ReturnCode
#1273 11/16/00 09:11 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
This second exception handler is indeed better, but the TOracleSession.ErrorMessage function should not raise an AV of course. We will fix this.

------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.081s Queries: 13 (0.060s) Memory: 2.5043 MB (Peak: 3.0426 MB) Data Comp: Off Server Time: 2024-05-17 07:38:32 UTC
Valid HTML 5 and Valid CSS