|
-
May 23rd, 2006, 05:09 PM
#1
Thread Starter
Hyperactive Member
[2005] WaitForChanged
When the code below is called it seems to hang forever, any ideas why?
Code:
Private Sub fswRejectedClaims_Created(ByVal sender As Object, ByVal e As System.IO.FileSystemEventArgs) Handles fswRejectedClaims.Created
Me.fswRejectedClaims.WaitForChanged(WatcherChangeTypes.Created)
MsgBox("The files....")
End Sub
-
May 23rd, 2006, 06:06 PM
#2
Re: [2005] WaitForChanged
That event is raised when a file is created. By calling WaitForChanged you are telling it to wait right there until another file is created, at which point the event will be raised again and you'll wait again. What exactly are you trying to achieve?
-
May 24th, 2006, 09:29 AM
#3
Thread Starter
Hyperactive Member
Re: [2005] WaitForChanged
just trying to wait for the file to finish downloading before i import it into a table.
-
May 24th, 2006, 09:34 AM
#4
Re: [2005] WaitForChanged
does your program download this file itself? if so there isn't a need for a FSW....
where does the file come from?
-
May 24th, 2006, 04:43 PM
#5
Re: [2005] WaitForChanged
 Originally Posted by texas
just trying to wait for the file to finish downloading before i import it into a table.
Assuming that you do need a FSW, the event is not raised, and thus the handler not executed, until a file is created, so telling it then to wait for a file to be created will wait for another file to be created because the one that raised the event has already been created, otherwise there would have been no event in the first place.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|