Jos Schering
Member
Executing the following 3 statements will create an AV and causes the application to disappear when an OLDER oracle client is used which is connected to a 10GR2 oracle server.
The AV won't happen if the query is closed (if chkCloseQuery.checked is checked). We are using an old version of DOA, but the latest doad7.exe trial version shows the same error. Of course the statements are not a real use case, but this causes the AV to happen all the time. Is this a known issue and is a workaround available? Any information or help would be appreciated.
Thanks, Jos (no problem reading dutch)
procedure TForm1.btnStartClick(Sender: TObject);
var
fSession : TOracleSession;
fOracleQuery1 : TOracleQuery;
fOracleQuery2 : TOracleQuery;
begin
fSession := TOracleSession.Create(nil);
fOracleQuery1 := TOracleQuery.Create(nil);
fOracleQuery2 := TOracleQuery.Create(nil);
try
try
fSession.LogonDatabase := edtOracleService.text;
fSession.LogonUsername := edtOracleUser.text;
fSession.LogonPassword := edtOraclePassword.text;
fSession.logon;
fOracleQuery1.Session := fSession;
fOracleQuery2.Session := fSession;
fOracleQuery1.SQL.Text := 'SELECT * FROM dual';
fOracleQuery1.Execute;
if chkCloseQuery.checked then
fOracleQuery1.Close;
fOracleQuery2.SQL.Text := 'alter system flush shared_pool';
fOracleQuery2.Execute;
fOracleQuery1.Execute;
fSession.logoff;
ShowMessage('No Error occurred');
except
on e : exception do
begin
ShowMessage('An Error occurred in OCI with the following message : ' + #13#10 +
'"' + e.message + '"' + #13#10 +
'This causes the app to die');
end;
end;
finally
FreeAndNil(fSession);
FreeAndNil(fOracleQuery1);
FreeAndNil(fOracleQuery2);
end;
end;
The AV won't happen if the query is closed (if chkCloseQuery.checked is checked). We are using an old version of DOA, but the latest doad7.exe trial version shows the same error. Of course the statements are not a real use case, but this causes the AV to happen all the time. Is this a known issue and is a workaround available? Any information or help would be appreciated.
Thanks, Jos (no problem reading dutch)
procedure TForm1.btnStartClick(Sender: TObject);
var
fSession : TOracleSession;
fOracleQuery1 : TOracleQuery;
fOracleQuery2 : TOracleQuery;
begin
fSession := TOracleSession.Create(nil);
fOracleQuery1 := TOracleQuery.Create(nil);
fOracleQuery2 := TOracleQuery.Create(nil);
try
try
fSession.LogonDatabase := edtOracleService.text;
fSession.LogonUsername := edtOracleUser.text;
fSession.LogonPassword := edtOraclePassword.text;
fSession.logon;
fOracleQuery1.Session := fSession;
fOracleQuery2.Session := fSession;
fOracleQuery1.SQL.Text := 'SELECT * FROM dual';
fOracleQuery1.Execute;
if chkCloseQuery.checked then
fOracleQuery1.Close;
fOracleQuery2.SQL.Text := 'alter system flush shared_pool';
fOracleQuery2.Execute;
fOracleQuery1.Execute;
fSession.logoff;
ShowMessage('No Error occurred');
except
on e : exception do
begin
ShowMessage('An Error occurred in OCI with the following message : ' + #13#10 +
'"' + e.message + '"' + #13#10 +
'This causes the app to die');
end;
end;
finally
FreeAndNil(fSession);
FreeAndNil(fOracleQuery1);
FreeAndNil(fOracleQuery2);
end;
end;