Turns out that this is a bug. For complicated reasons that I won't go into, the current implementation of LoadClassInformation only works for classes that have events, which ADOX.Catalog doesn't. Unfortunately, no other class in ADOX has events, either, so there's no easy workaround with current versions of Window-Eyes.

The good news, though, is that LoadClassInformation will work in future versions of Window-Eyes for anything that exposes a type library, including ADOX.Catalog.

I think the only thing you can do for now is something ugly like this:

' Attempt to load the class information because it will work in later versions
On Error Resume Next
LoadClassInformation( Catalog )
Err.Clear
On Error Goto 0

' if adInteger isn't defined, the LoadClassInformation failed.
If adInteger <> 3 Then
   adEmpty = 0
   adTinyInt = 16
   adSmallInt = 2
   adInteger = 3
   adBigInt = 20
   adUnsignedTinyInt = 17
   adUnsignedSmallInt = 18
   adUnsignedInt = 19
   adUnsignedBigInt = 21
   adSingle = 4
   adDouble = 5
   adCurrency = 6
   adDecimal = 14
   adNumeric = 131
   adBoolean = 11
   adError = 10
   adUserDefined = 132
   adVariant = 12
   adIDispatch = 9
   adIUnknown = 13
   adGUID = 72
   adDate = 7
   adDBDate = 133
   adDBTime = 134
   adDBTimeStamp = 135
   adBSTR = 8
   adChar = 129
   adVarChar = 200
   adLongVarChar = 201
   adWChar = 130
   adVarWChar = 202
   adLongVarWChar = 203
   adBinary = 128
   adVarBinary = 204
   adLongVarBinary = 205
   adChapter = 136
   adFileTime = 64
   adPropVariant = 138
   adVarNumeric = 139
 ' and any other enums you might need here.
End If


Chip Orange wrote:
oh yes, I can use a browser, I'd really like to know why can't I use the
defined enums inside of window eyes scripting?  I can inside of vba
scripting for instance, so either I'm doing something wrong, or I need to
turn this in as a problem?

thanks.

Chip
-----Original Message-----
From: Aaron Smith [mailto:[email protected]] Sent: Monday, November 23, 2009 10:07 AM
To: [email protected]
Subject: Re: activex help please

If the object's documentation doesn't provide this information, then your
best bet would be to use an object browser of some sort (i.e. Visual Studio VB, Word VBA, OLEView).

Aaron

On 11/22/2009 11:57 PM, Allison and Chip Orange wrote:
Hi GW and all,

I am trying to access the enumerations for the adox object, in particular, adox.catalog.

when I try to execute the loadclassinformation command with an object of this type, I get an error that this object doesn't support enumeration.

the object viewer in word shows me that all the enums are in a class named ADOX.DataTypeEnum, but I can't use createobject on this class; it tells me it can't create it, so I can't load the class info.

can anyone from GW give me an idea how to get to the enum definitions for adox.catalog?

thanks.

Chip



--
To insure that you receive proper support, please include all past
correspondence (where applicable), and any relevant information pertinent to
your situation when submitting a problem report to the GW Micro Technical
Support Team.

Aaron Smith
GW Micro
Phone: 260/489-3671
Fax: 260/489-2608
WWW: http://www.gwmicro.com
FTP: ftp://ftp.gwmicro.com
Technical Support&  Web Development


Reply via email to