[python-win32] FetchProgress event problem

Dawid Zamirski dzrudy at gmail.com
Thu Dec 22 16:15:29 CET 2005


Hello

I'm trying to track recordset loading progress (it is loaded 
asynchronously), but neither FetchProgresss or FetchComplete event is 
launched. I played with WillMove events in sychronous mode and they work 
just fine. Can someone guide me how to get those events fired? I'm using 
pywin32 build 205. Here's my test code:

import win32com.client

class RSEvents:
    def OnWillMove(*args):
       print "will move"
   
    def OnFetchProgress(*args):
       print "fetch progress"
   
    def OnFetchComplete(*args):
       print "fetch complete"

def Test():
    conn = win32com.client.Dispatch(r"ADODB.Connection")
    connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=test.mdb"
    conn.Open( connstr )
    rs = win32com.client.DispatchWithEvents(r"ADODB.Recordset", RSEvents)
    rs.CursorLocation = 3
    rs.Open("SELECT * FROM test", 3, 1, 49)

if __name__ == "__main__":
    Test()

Thank You in Advance


More information about the Python-win32 mailing list