Craig
You wrote in message news:s7hI5.103498$
[hidden email]...
> Earlier I asked for help on how to use an ADO method
> that had 2 optional arguments. I finally had success
> like this. Optional arguments are given as (VARIANT unspecified).
>...
Sorry, I didn't realise you were asking about optional arguments, or I
missed your posting, as otherwise I could have told you this straight away.
BTW: The reason that the type-library wizard doesn't generate methods
without the optional arguments (i.e. ones that would pass the optional
arguments for you) even though it knows when arguments are optional, is that
I was worried about combinatorial-explosion, i.e. a method with several
arguments, a few of which are optional, would potentially generate quite a
large number of combinations if one unthinkingly generates each possible
combination of mandatory and optional arguments. This is similar to a
typical Smalltalk problem that occurs most frequently in class side instance
creation methods when one can pass extra operands to override the defaults
in a new object, and in that case one swings between doing the lot or only a
minimal set.
I think perhaps it might be an idea to generate two methods in each case.
One with all optional arguments, and one with none. This will make it easier
for the programmer to intelligently add those extra which might be needed,
and handle the quite common case where the optional arguments are hardly
ever used.
Regards
Blair McGlashan
Object Arts Ltd
http://www.object-arts.com