?
TConnectionAccessor = class(TSpecialConnector)
public
FProxy: TSQLite3Connection;
end;
That gives an 'invalid type cast' runtime error. I'm not sure, but I was under the impression that if you introduce a field with the same name of an inaccessible one, it creates a new field. But it's hard to find the documentation for that.
EDIT: Related to your other thread:
Have you tried by checking the ConnectionDef of the FProxy?
FProxy is a TSQLConnection, but you could try casting it
AIRCODE
procedure TSpecialConnector.DoInternalConnect;
begin
if ConnectorType = 'SQLite3' then
TSQLite3Connection(Self).FProxy.OpenFlags :=
[sofReadWrite, sofCreate, sofFullMutex, sofSharedCache];
inherited DoInternalConnect;
//blablabla....
Well, yes, but I cannot access FProxy, so far. The above code generates the 'not related' or 'invalid typecast' error, depending.
and i was under the impression one should call the inherited Method first in this case...
procedure TSQLConnector.DoInternalConnect;
Var
D : TConnectionDef;
begin
inherited DoInternalConnect;
CheckProxy;
FProxy.CharSet:=Self.CharSet;
FProxy.DatabaseName:=Self.DatabaseName;
Ok, I'll try that as soon as I can set those OpenFlags.
But it's possible I don't understand what I'm doing.