With DOA 3.3.1, loss of connection is not handled terribly well. The problem is that the majority of OCI calls are made without first checking the validity of the handles which are passed in. To demonstrate, build an app with a TOracleSession and TOracleData component tied to a data source and a DB grid. Connect to the session to a remote DB, and set the dataset SQL to 'select * from all_objects' and set QueryAllRecords to False.
After the grid has been (partially) populated, disconnect your network cable, then try to scroll past the end of records currently fetched. After a small timeout, an ORA-03113 exception is raised (as expected). The problem is that a subsequent attempt to scroll causes an AV in OraClient8.dll, due to the fact that the statement handle is passed into OCIStmtFetch is invalid.
It gets worse - if the session has been disconnected by the client app, then nil statement handles are passed into OCI (with the same result). To see this, drop a TOracleQuery on the form, and add the following code to a buttonclick:
OracleQuery1.Session := OracleSession1;
OracleQuery1.SQL := 'select * from emp';
OracleQuery1.Execute;
OracleSession1.Connected := False;
ShowMessage(IntToStr(OracleQuery1.RowsProcessed));
Is this issue likely to be fixed in a future release?
After the grid has been (partially) populated, disconnect your network cable, then try to scroll past the end of records currently fetched. After a small timeout, an ORA-03113 exception is raised (as expected). The problem is that a subsequent attempt to scroll causes an AV in OraClient8.dll, due to the fact that the statement handle is passed into OCIStmtFetch is invalid.
It gets worse - if the session has been disconnected by the client app, then nil statement handles are passed into OCI (with the same result). To see this, drop a TOracleQuery on the form, and add the following code to a buttonclick:
OracleQuery1.Session := OracleSession1;
OracleQuery1.SQL := 'select * from emp';
OracleQuery1.Execute;
OracleSession1.Connected := False;
ShowMessage(IntToStr(OracleQuery1.RowsProcessed));
Is this issue likely to be fixed in a future release?