Click here to Skip to main content
15,910,877 members
Home / Discussions / C#
   

C#

 
AnswerRe: Is there any way to monitor a text file? Pin
Christian Graus19-Sep-06 0:23
protectorChristian Graus19-Sep-06 0:23 
GeneralRe: Is there any way to monitor a text file? Pin
CooperWu19-Sep-06 1:01
CooperWu19-Sep-06 1:01 
AnswerRe: Is there any way to monitor a text file? Pin
Rob Philpott19-Sep-06 4:39
Rob Philpott19-Sep-06 4:39 
It's a bit grim, but if you're on Sql Server 2005, you can write managed stored procedures in C#, so you could use some mechanism like Remoting to send an update from your managed proc to the listening process. You'd then need to link your managed proc into the trigger.

As far as monitoring file changes, the following code snippet may give you some pointers:

using System.IO;

_watcher = new FileSystemWatcher();
_watcher.Path = folder;
_watcher.IncludeSubdirectories = true;
_watcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.DirectoryName | NotifyFilters.FileName;
_watcher.Changed += new FileSystemEventHandler(OnChanged);
_watcher.Created += new FileSystemEventHandler(OnChanged);
_watcher.Deleted += new FileSystemEventHandler(OnChanged);
_watcher.Renamed += new RenamedEventHandler(OnRenamed);





Regards,
Rob Philpott.

GeneralRe: Is there any way to monitor a text file? Pin
CooperWu19-Sep-06 16:28
CooperWu19-Sep-06 16:28 
QuestionFormatting and Rounding Numbers Pin
Brendan Vogt18-Sep-06 23:38
Brendan Vogt18-Sep-06 23:38 
AnswerRe: Formatting and Rounding Numbers Pin
Christian Graus18-Sep-06 23:46
protectorChristian Graus18-Sep-06 23:46 
AnswerRe: Formatting and Rounding Numbers Pin
Stefan Troschuetz18-Sep-06 23:47
Stefan Troschuetz18-Sep-06 23:47 
AnswerRe: Formatting and Rounding Numbers Pin
CooperWu18-Sep-06 23:54
CooperWu18-Sep-06 23:54 
GeneralRe: Formatting and Rounding Numbers Pin
Brendan Vogt19-Sep-06 0:44
Brendan Vogt19-Sep-06 0:44 
GeneralRe: Formatting and Rounding Numbers Pin
CooperWu19-Sep-06 1:06
CooperWu19-Sep-06 1:06 
GeneralRe: Formatting and Rounding Numbers Pin
Brendan Vogt19-Sep-06 1:07
Brendan Vogt19-Sep-06 1:07 
AnswerRe: Formatting and Rounding Numbers Pin
Mirunab19-Sep-06 1:27
Mirunab19-Sep-06 1:27 
QuestionHow to call Form inside a Form Pin
jackyha18-Sep-06 23:22
jackyha18-Sep-06 23:22 
AnswerRe: How to call Form inside a Form Pin
KrunalC18-Sep-06 23:30
KrunalC18-Sep-06 23:30 
GeneralRe: How to call Form inside a Form Pin
jackyha18-Sep-06 23:45
jackyha18-Sep-06 23:45 
GeneralRe: How to call Form inside a Form Pin
Stefan Troschuetz18-Sep-06 23:52
Stefan Troschuetz18-Sep-06 23:52 
GeneralRe: How to call Form inside a Form Pin
jackyha18-Sep-06 23:57
jackyha18-Sep-06 23:57 
AnswerRe: How to call Form inside a Form Pin
Mostafa Siraj19-Sep-06 12:12
Mostafa Siraj19-Sep-06 12:12 
Questionhow to change a cell value in datagrid Pin
faladrim18-Sep-06 23:11
faladrim18-Sep-06 23:11 
QuestionHow to provide help for console application Pin
zxc8918-Sep-06 22:57
zxc8918-Sep-06 22:57 
AnswerRe: How to provide help for console application Pin
Stefan Troschuetz18-Sep-06 23:24
Stefan Troschuetz18-Sep-06 23:24 
AnswerRe: How to provide help for console application Pin
Green Fuze19-Sep-06 0:11
Green Fuze19-Sep-06 0:11 
AnswerRe: How to provide help for console application Pin
zxc8919-Sep-06 0:40
zxc8919-Sep-06 0:40 
QuestionHow do you get the current active application name ? Pin
CJayMeister18-Sep-06 22:42
CJayMeister18-Sep-06 22:42 
AnswerRe: How do you get the current active application name ? Pin
S. Senthil Kumar19-Sep-06 2:43
S. Senthil Kumar19-Sep-06 2:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.