ZQuery error

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
AnalogXP
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 15.08.2008, 21:45

ZQuery error

Post 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.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Image
Locked