Erorr Ora-03114(Not Connected to Oracle) and TOracleSession.Connected = True

Devil

Member²
Why, if property TOracleSession.Conected was true and generated Exception ora-03114 Not connected to Oracle when I execute some data in TOracleQuery or TOracleDataSet then this property not set to False on this exception?

Example: I can't do 20 line, because OracleSession.Connected return True. But Checkconnection on every fetch is not success :-).

begin
OracleSession.Connected := true;
OracleQuery.SQL := 'select * from many_rows_table_sample';
OracleQuery.Execute;
while not OracleQuery.Eof do
try
//20 if not OracleSession.Connected
// then OracleSession.CheckConnection(True);
//some operation;
//...
OracleQuery.Next;
exception
on E: EOracleError and (E.ErrorCode = 3114) do
if not SleepWhileNotReconnect(E.Session)
then raise;
end
end;

function SleepWhileNotReconnect(ASession: TOracleSession): Boolean;
var
i: Integer;
begin
for i := 0 to 5 do
begin
//Check connection every minute;
Result := ASession.CheckConnection(True) ccError;
if Result
then Exit
else sleep(60000);
end;
end;

Who tell me others oracle error codes, when i can reestablish connection end proceed fetch next rows in OracleQuery
 
Why, if property TOracleSession.Conected was true and generated Exception ora-03114 Not connected to Oracle when I execute some data in TOracleQuery or TOracleDataSet then this property not set to False on this exception?
The TOracleSession component does not interpret Oracle exceptions to determine if a connection is lost. In case of an ORA-03114 or ORA-03113, there is most likely an underlying Oracle bug that has caused the Oracle server process for your session to crash.
Who tell me others oracle error codes, when i can reestablish connection end proceed fetch next rows in OracleQuery
You can never "proceed" with a query after a connection is lost. The Oracle cursor is lost as well, along with all other session state information, so it cannot be continued.
 
Originally posted by Marco Kalter:

Who tell me others oracle error codes, when i can reestablish connection end proceed fetch next rows in OracleQuery
You can never "proceed" with a query after a connection is lost. The Oracle cursor is lost as well, along with all other session state information, so it cannot be continued.
Sorry, my previos examle not correct I'm mean when TOracleQuery fetch all records and I use rows values for execute some block in other Query conneted to this or other TOracleSession for exmple:
Query.SQL.Text := 'begin
someproc(:var1, var2);
end';
where var1 and var2 this actualy some field from first Query
In this case I can use reconnect for continue execute other block.
What other error possible, except ora-03114 and ora-03113, will be proceed in try exception end block for reconnect? For example: for other TOracleSession (in second Query) connected to other oracle database if exception error ora-01017(invalid user) I'm not reestablish connection and will be exit from my program or block.In other case when except ora-03013 I'm must reconnect.
Thanks to your help, Marco.
 
I need determine range errors which related with error as network connection was lost or networks errors. What this errors?
 
Back
Top