Cookbook example, DAO error

Peter van Kampen news.but.NO.SPAM at datatailors.com
Mon Sep 23 13:39:48 CEST 2002


Hi,

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\jet2sql.py", line 128, in getPrimaryKey
      for idx in currTabl.Indexes:
  File "c:\python22\lib\site-packages\win32com\gen_py\ 
00025E01-0000-0000-C000-000000000046x0x4x0.py" , line 956, in __getitem__
      return self._enum_.__getitem__(index)
  File "C:\Python22\Lib\site-packages\win32com\client\util.py", line 37, in __getitem__
      return self.__GetIndex(index)
  File "C:\Python22\Lib\site-packages\win32com\client\util.py", 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?

TIA,

PterK



More information about the Python-list mailing list