That was just a typo when I was posting to the list :-). In real code I 
have the recordset setup correctly, it's just the FetchProgress and 
FetchComplete events that do not work.

Tim Roberts wrote:
> On Thu, 22 Dec 2005 10:15:29 -0500, Dawid Zamirski <[EMAIL PROTECTED]> wrote:
>
>   
>> 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()
>>  
>>
>>     
>
> Besides Roger's comments, in this PARTICULAR example, you have not 
> connected the Recordset with the Connection.  Don't you want this:
>
>     rs.Open( "SELECT * FROM test", conn, 3, 1, 49 )
> or:
>     rs.Open( "test", conn, 3, 2, 49 )
>
>   
_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to