Hi,

I am using FileSystemWatcher. my C# application is watching the file with this 
filewatcher.
>From the backend through trigger, i am modifying the file with the help of 
>sp_makewebtask stored proc.
The triggers are written for insert, update and delete.

The problem that i am facing now is when i try to update or insert a single 
record in the table the file watcher is raisng the event 
"watcherFileForTasksTable_Changed"
4 times. but i have written the event handler only for lastwrite. but 4 times 
the events are raised for File changed.
I want the event has to be raised only one time.

any ideas why i am facing this problem.

the code:
watcherFileForTasksTable.Path = "d:\testing";

watcherFileForTasksTable.NotifyFilter = NotifyFilters.LastWrite ;

watcherFileForTasksTable.Filter = "*.txt"; // Only watch text files.

watcherFileForTasksTable.Changed +=new 
FileSystemEventHandler(watcherFileForTasksTable_Changed);

watcherFileForTasksTable.EnableRaisingEvents = true;

and the event is:
private void watcherFileForTasksTable_Changed(object sender, 
FileSystemEventArgs e)
{

}


Regards,
Krishnan

[Non-text portions of this message have been removed]





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 




Reply via email to