@wp I checked example and We have to go back to the beginning. ZEOS 8 has better error handling, but ZEOS 7.2 shows that there are problems with VpZeosDs.
First of all I can see that the code has a confusing reference to the Connected property from Database Connection Component.
For example, see the procedure TVpZeos.Datastore.SetConnected
It says:
if (AValue = Connected) or (FConnection = nil) then Exit;
if AValue and AutoCreate and not TablesExist then CreateTables;
FConnection.Connected := AValue;
It probably does not make sense. The order is also probably wrong. Shouldn't it be like this?
if FConnection = nil then Exit;
if AValue = FConnection.Connected then Exit;
FConnection.Connected := AValue;
if AValue and AutoCreate and not TablesExist then CreateTables;
Similar bugs are in procedure TVpZeosDatastore.CreateTables. For example look at wasConnected variable usage.
It's hard for me to improve code because I don't know the whole component. Maybe You could take a look at this?
In my opinion, this problem generates random errors.