[python-win32] (no subject)

Mike Nugent nugentm at myrealbox.com
Thu May 15 13:47:31 EDT 2003


I am trying to open a ADO records set against Active Directory using
win32com. The problem is that a maximum of 1000 records is imposed.
Microsoft docs states that setting "Page Size" to great number will allow
all the records to be returned. I cannot find the Page Size setting. My
tests are as folllows:
PythonWin 2.2.1 (#34, Apr 15 2002, 09:51:39) [MSC 32 bit (Intel)] on win32.
Portions Copyright 1994-2001 Mark Hammond (mhammond at skippinet.com.au) - see
'Help/About PythonWin' for further copyright information.
>>> import win32com.client
>>> conn = win32com.client.Dispatch('ADODB.Connection')
>>> conn.Provider='ADsDSOObject'
>>> conn.Properties('Page Size') = 80000
Traceback (SyntaxError: can't assign to function call
>>> conn.Properties('Page Size').Value = 80000
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "C:\Python22\\lib\site-packages\win32com\client\dynamic.py", line
151, in __call__
    return
self._get_good_object_(apply(self._oleobj_.Invoke,allArgs),self._olerepr_.de
faultDispatchName,None)
com_error: (-2147352567, 'Exception occurred.', (0, 'ADODB.Properties',
'Item cannot be found in the collection corresponding to the requested name
or ordinal.', 'C:\\WINNT\\HELP\\ADO270.CHM', 1240649, -2146825023), None)
>>> conn.Open('ldap client')
>>> rs, recs=conn.Execute("select ADsPath from 'LDAP://ADServer where cn =
'*'")
>>> rs.Properties('Page Size')=80000
Traceback (SyntaxError: can't assign to function call
>>> for i in range(1,32):
...  print conn.Properties(i).Name
...
Pass By Ref Accessors
Catalog Location
Catalog Term
Catalog Usage
Data Source Name
Read-Only Data Source
Data Source Object Threading Model
Maximum Row Size
OLE Object Support
Persistent ID Type
Provider Friendly Name
Provider Name
OLE DB Version
Provider Version
SQL Support
Rowset Conversions on Command
User Name
Password
User ID
Encrypt Password
Integrated Security
Data Source
Location
Extended Properties
Connect Timeout
Prompt
Window Handle
Mode
Bind Flags
ADSI Flag
Autocommit Isolation Levels

Any assistance would be appreciated.
Thanks
Mike






More information about the Python-win32 mailing list