Access violation when calling Free on TIBCQuery.

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
amiller29au
Posts: 11
Joined: Fri 03 Dec 2010 00:45
Location: AU

Access violation when calling Free on TIBCQuery.

Post by amiller29au » Mon 10 Oct 2011 07:21

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;

AndreyZ

Post by AndreyZ » Tue 11 Oct 2011 09:21

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.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 21 Oct 2011 12:27

We have fixed this problem. This fix will be included in the next IBDAC build.

amiller29au
Posts: 11
Joined: Fri 03 Dec 2010 00:45
Location: AU

Post by amiller29au » Wed 09 Nov 2011 00:49

Any idea when this fix will be released?

AndreyZ

Post by AndreyZ » Wed 09 Nov 2011 09:08

We plan to release IBDAC approximately in two weeks.

Post Reply