TDARemoteCommand EXECUTE USAGE

Hi,
I used below code to execute a stored procedure in FB3 (DA 9.5.111.1399 , Delphi 10.3 , FB)

   lInputParameters:=DataParameterArray.Create;
   lOutputParameters:=Nil;
              With lInputParameters.Add do
              begin
                Name:='IN_W_GRP2_ID_FK';
                Value := Trim(sGrp2);
              end;

…repeat add the parameter for the input parameter

   da_RemoteCmd.Execute('CREATE_W', lInputParameters,lOutputParameters);

The execute command trigger below error message (The TDAParamCollection collection doesnt support Default Items.

Please advise.

Hi,

can you create a simple testcase, that reproduces this case, pls?
you can attach it here or send directly to support@

please download the testing db and code, the success button and fail buttton.

The fail button can produce the error

sample project

Hi,

your code contains

                  With lInputParameters.Add do
                  begin
                    lInputParameters.Add.
                    Name:='IN_DRAW_IS_TEAM';
                    Value := sIsTeam;
                  end;

so it is equal to

                  With lInputParameters.Add do
                  begin
                    lInputParameters.Add.Name:='IN_DRAW_IS_TEAM';  //<<< this line add a new parameter w/o value;
                    Value := sIsTeam;  //<< this line adds parameter w/o Name and it caused that error.
                  end;

Thanks, I’ll recheck it