ZQuery error
Posted: 14.05.2010, 14:08
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:
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:
If I create a new project all work ok.
How to find a problem?
I don't know how to use SVN.
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;
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;
How to find a problem?
I don't know how to use SVN.