Properties | Methods | Example |
Unit
TRPCB
Description
The TMult component is used whenever a list of
multiple values needs to be passed to a remote procedure call (RPC) in a single parameter. The Mult
property of a parameter is of TMult type. The information put in the TMult
variable is really stored in a TStringList, but it's the access methods that are
used to read and write that take strings as subscripts and provide the illusion
of a string-subscripted array. It's important to note that items in a TMult
component may or may not be sorted. If the Sorted
property is False (default), then the elements will be stored in the order they
are added. If Sorted is True, items will be stored in ascending alphabetical
order by subscripts.
If you attempt to reference an element by a
nonexistent subscript you will get an error in form of a Delphi exception. Don't
forget that M syntax dictates that all strings must be surrounded by double
quotes. So if your goal is to pass a string subscripted array of strings using
TMult as a parameter to an RPC on the M server, don't forget to surround each of
the subscripts and their associated values with double quotes (").
Otherwise, M will assume that you're passing a list of variables and will
attempt to reference them, which is probably not what you want.