Page 1 of 1

ZQuery error

Posted: 14.05.2010, 14:08
by AnalogXP
I work with SQLite, Delphi 2010.
If I put on the form (in my program) a ZQuery component and run I get a AccesViolation. The compiler stop on this line:

Code: Select all

procedure TZAbstractRODataset.Notification(AComponent: TComponent;
  Operation: TOperation);
begin
  inherited Notification(AComponent, Operation);

  if (Operation = opRemove) and (AComponent = FConnection) then
  begin
    Close;
    FConnection := nil;
  end;

  if (Operation = opRemove) and Assigned(FDataLink)// <----- Error
    and (AComponent = FDataLink.Datasource) then
    FDataLink.DataSource := nil;

  if (Operation = opRemove) and Assigned(FMasterLink)
    and (AComponent = FMasterLink.Datasource) then
  begin
    FMasterLink.DataSource := nil;
    RereadRows;
  end;
end;
If I delete the ZQuery from form the project is run ok. But if create ZQuery in runtime and execute a ZQuery.Open I have a other error. The compiler stop on this line:

Code: Select all

procedure TZAbstractRODataset.InternalPrepare;
begin
  CheckSQLQuery;
  CheckInactive;
  CheckConnected;

  Connection.ShowSQLHourGlass;
  try
    if (FSQL.StatementCount > 0) and((Statement = nil) or (Statement.GetConnection.IsClosed)) then// <----- Error
      Statement := CreateStatement(FSQL.Statements[0].SQL, Properties)
    else
      if (Assigned(Statement)) then
         Statement.ClearParameters;
  finally
    Connection.HideSQLHourGlass;
  end;
end;
If I create a new project all work ok.
How to find a problem?
I don't know how to use SVN.

Posted: 16.05.2010, 21:45
by mdaems
Hi,

First of all : it shouldn't be necessary to know something about SVN. If you need snapshots of the components you can find them at http://zeosdownloads.firmos.at/

Concerning your problem. Do I understand correctly that you only have the problem when changing old projects, but not when building new ones? In that case, do you use old or new databases when running the old projects under D2010?

Mark