From the MSDN description.
Set recordset = connection.OpenSchema (QueryType, Criteria, SchemaID)
QueryType Any SchemaEnum value that represents the type of schema query to
Criteria Optional. An array of query constraints for each QueryType
as listed in SchemaEnum.
SchemaID The GUID for a provider-schema query not defined
by the OLE DB specification. This parameter is required if
is set to adSchemaProviderSpecific; otherwise, it is not used.
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
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