Python COM: How to access constants in type lib

Roger Upole rupole at compaq.net
Fri Jul 7 00:29:26 EDT 2000


If you first run Makepy on the object (it shows as Microsoft DAO Object
Library
on my system), the constants will be available in win32com.client.constants.
eg win32com.client.constants.dbQMakeTable
            HTH
                     Roger Upole


"Charles Medcoff" <cmedcoff at my-deja.com> wrote in message
news:8k37mi$o76$1 at nnrp1.deja.com...
> When using Python as a COM client, how can I use/access constants
> defined in a type lib from Python.
>
> Example:
>
>
> import win32com.client
>
> engine = win32com.client.Dispatch("DAO.DBEngine.35")
> db = engine.OpenDatabase(r"\test.mdb")
>
> query = db.CreateQueryDef("base", "SELECT, bla, bla...")
> query.Type = dbQMakeTable # this doesn't work
>
> Thanks,
> Chuck
>
>
>
>
>
>
> --
> Charles Medcoff
> Senior Systems Engineer
> Pyramid Solutions
> 1850 Research Drive, Suite 300
> Troy, MI 48083
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.





More information about the Python-list mailing list