[python-win32] Re: FetchProgress event problem

Roger Upole rwupole at msn.com
Sun Dec 25 07:07:01 CET 2005

Try adding pythoncom.PumpWaitingMessages() at the point where
you're waiting for the fetch to complete.  The events show up for
me if I add this loop to the bottom of the test function:
    while 1:


----- Original Message ----- 
From: "Dawid Zamirski" <dzrudy at gmail.com>
To: <python-win32 at python.org>
Sent: Friday, December 23, 2005 2:06 PM
Subject: Re: [python-win32] FetchProgress event problem

> The objects last quite long because it's a huge database (about 730000 
> records) and it takes a few minutes to load, that is why I wanted to 
> track the progress so the user know that something is happening. As for 
> now, I implemented "pulse" progress bar to notify the user of activity, 
> however accurate progress bar would be nicer
> Roger Upole wrote:
>> It's likely your recordset and connection objects are going out
>> of scope before they get a chance to fire any events.  As soon as
>> the function exits, both of the COM objects will be released.
>> Also, you might want to use the named constants from
>> win32com.client.constants in place of hardcoded values.
>> rs.CursorLocation=win32com.client.constants.adUseClient
>> makes the intent much clearer.
>>      hth
>>        Roger

More information about the Python-win32 mailing list