Page 1 of 1

Access violation when calling Free on TIBCQuery.

Posted: Mon 10 Oct 2011 07:21
by amiller29au
Hi,

I'm receiving an Access Violation error when calling Free on a TIBCQuery created in code.

Example code below from Sample form. Just placed a TIBCConnection component and setup database connection string. Then added button and attach it to OnClick event handler below.

Code: Select all

function TForm1.NewQuery(ANewTransaction: Boolean): TIBCQuery;
begin
  Result := TIBCQuery.Create(Self);
  Result.Connection := IBCConnection1;

  if ANewTransaction then
  begin
    Result.Transaction := TIBCTransaction.Create(Result);
    Result.UpdateTransaction := TIBCTransaction.Create(Result);

    IBCConnection1.AddTransaction(Result.Transaction);
    IBCConnection1.AddTransaction(Result.UpdateTransaction);
  end;
end;

procedure TForm1.BitBtn1Click(Sender: TObject);
var
  query: TIBCQuery;
begin
  query := NewQuery(True);
  try
    query.SQL.Text := 'SELECT * FROM CUSTOMER';
    query.Open;

    // Do something here

  finally
    query.Close;
    query.Free; // <- Access Violation here.
  end;
end;

Posted: Tue 11 Oct 2011 09:21
by AndreyZ
Thank you for the information. We have reproduced the problem and the investigation of the problem is in progress. We will notify you when we have any results.

Posted: Fri 21 Oct 2011 12:27
by Dimon
We have fixed this problem. This fix will be included in the next IBDAC build.

Posted: Wed 09 Nov 2011 00:49
by amiller29au
Any idea when this fix will be released?

Posted: Wed 09 Nov 2011 09:08
by AndreyZ
We plan to release IBDAC approximately in two weeks.