Hi,

is there posibility introduce in class helper method with same name like in base class ?


For example:

TSQLQueryHelper = class helper for TSQLQuery
  public
procedure ExecSQL(const ASQL: string; const Args: array of const); overload;
end;

procedure TSQLQueryHelper.ExecSQL(const ASQL: string; const Args: array of const);
begin
  SQL.Text := Format(ASQL, Args);
ExecSQL; // here I want call ExecSQL of TSQLQuery, but compiler complains about wrong number of parameters
end;

When I use:
  inherited ExecSQL;

it compiles (and why is there need to use "inherited", when I use overload and there exists method ExecSQL without parameters?)

, but later I get again error "Wrong number of parameters specified for call to "ExecSQL"",
when I want use ExecSQL('',[]) in instance of TSQLQuery

Thanks

-Laco.

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to