Cookbook example, DAO error

Peter van Kampen news.but.NO.SPAM at
Mon Sep 23 07:39:48 EDT 2002


I am trying to run the jet2sql script from the Python cookbook but it
fails. I use win2K with activepython (latest version). I have tried it
on two computers both with the samen result. I have narrowed it down to
a failure to enumerate the Indexes collection. Here's the (relevant part
of) the traceback msg (in pythonwin):

  File "I:\d\Python\", line 128, in getPrimaryKey
      for idx in currTabl.Indexes:
  File "c:\python22\lib\site-packages\win32com\gen_py\" , line 956, in __getitem__
      return self._enum_.__getitem__(index)
  File "C:\Python22\Lib\site-packages\win32com\client\", line 37, in __getitem__
      return self.__GetIndex(index)
  File "C:\Python22\Lib\site-packages\win32com\client\", line 53, in __GetIndex
      result = self._oleobj_.Next(1)
com_error: (-2146825178, 'OLE error 0x800a0c26', None, None)

If I run from the commandline I  get

[same output]
pywintypes.com_error: (-2146825178, 'OLE error 0x800a0c26', None, None)

Has anyone else seem this problem, or does anyone have any idea how
solve it?



More information about the Python-list mailing list