Page 1 of 1

Problem with BreakExec and NonBlocking

Posted: Thu 15 Feb 2007 17:36
by AlexandreECAD
I've the following code:

Code: Select all

procedure RunQuery;
begin
  qryTest.Active := False;
  qryTest.NonBlocking := True;

  if not qryTest.Prepared then
  begin
   qryTest.Prepare;
  end;

  qryTest.Active := True;

  while qryTest.Executing do
  begin
    Sleep(100);
    Application.ProcessMessages;
  end;

end;

procedure CancelQuery;
begin
  if qryTest.Executing then
  begin
    qryTest.BreakExec;
  end;
end;

When execute the RunQuery without canceling it with procedure CancelQuery everything works fine, but if I cancel the query, the next time I execute Runquery procedure in the same session, it stop in qryTest.Active := True, not respecting the NonBlocking setting.

My configuration:
Oracle Enterprise 8.1.7
ODAC with Net Option (Last version with a bug fix for Oracle Fetch out sequence, that Oleg sent me last week)
BDS 2006.

I've found a workaround

Posted: Thu 15 Feb 2007 18:39
by AlexandreECAD
If I remove the following part of the code its works fine.

Code: Select all

if not qryTest.Prepared then 
  begin 
   qryTest.Prepare; 
  end; 
I think the prepare isnt working 100%.

Posted: Fri 16 Feb 2007 10:49
by Plash
We could not reproduce the problem.
Please send a complete small sample to odac*crlab*com to demonstrate it, including script to create server objects.