ADO constants
Mark Hammond
mhammond at skippinet.com.au
Fri Dec 6 17:19:51 EST 2002
Brad Clements wrote:
> "Mark Hammond" <mhammond at skippinet.com.au> wrote in message
> news:vKXH9.25492$q43.77505 at news-server.bigpond.net.au...
>
>
>>These constants are only available when you have run makepy for the
>
> library.
>
> Slightly OT .. what about constant name collisions? Is this not an issue?
>
> I'm worried about using two COM objects that have overlapping constant
> names. What happens?
Last one wins ;)
VB seems to use a global namespace for constants too - hence we see all
constants with a special prefix "ado", "cdo", etc.
However, as the other poster pointed out, EnsureModule or
GetModuleForProgID will give you access to each specific module's
constants, so if there was a name collosion you would have to fall back
to getting the constant directly from the module, rather than the global
"constants" pool.
Mark.
More information about the Python-list
mailing list