Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-10

TSQLDBWebDataProvider.OnGetParameterType wrong number of parameters

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Leonardo M. Ramé

I'm getting the error Wrong number of parameters specified for call to "myOnGetParamType" when trying to set a method to the OnGetParameterType event of TSQLDBWebDataProvider.

The event OnGetParameterType is of type TGetParamTypeEvent, defined in sqldbwebdata.pp:

TGetParamTypeEvent = Procedure (Sender : TObject;
  Const ParamName,AValue: String; Var AType : TFieldtype) of object;

My method is this:

procedure myOnGetParamType(Sender : TObject; Const ParamName, AValue : String;
   Var AType : TFieldtype);

As you can see, my method has the same structure of TGetParamTypeEvent.

Why I'm getting this error?

Reply by email

Leonardo M. Ramé
to Leonardo M. Ramé
Leonardo M. Ram? wrote 19 lines
I'm getting the error Wrong number of parameters specified for call to "myOnGetParamType" when trying to set a method to the OnGetParameterType event of TSQLDBWebDataProvider. The event OnGetParameterType is of type TGetParamTypeEvent, defined in sqldbwebdata.pp: TGetParamTypeEvent = Procedure (Sender : TObject; Const ParamName,AValue: String; Var AType : TFieldtype) of object; My method is this: procedure myOnGetParamType(Sender : TObject; Const ParamName, AValue : String; Var AType : TFieldtype); As you can see, my method has the same structure of TGetParamTypeEvent. Why I'm getting this error?

Sorry, forgor to add the @ in the assignemnt, it should be @myOnGetParamType. :)

Reply by email