[python-win32] FetchProgress event problem
Dawid Zamirski
dzrudy at gmail.com
Tue Dec 27 15:03:21 CET 2005
Success! The PumpWaitingMessages method solved the problem and the
events are called now.
Thank You,
Dawid
Roger Upole wrote:
> 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:
> pythoncom.PumpWaitingMessages()
> time.sleep(0.1)
>
> Roger
>
>
> ----- 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
>>>
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
>
More information about the Python-win32
mailing list